Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,8 @@ 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:
Expand Down Expand Up @@ -1561,6 +1563,8 @@ 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
Expand Down Expand Up @@ -1634,6 +1638,8 @@ 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:
Expand Down Expand Up @@ -1765,6 +1771,15 @@ 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:
Expand Down Expand Up @@ -16354,6 +16369,30 @@ 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:
Expand Down
10 changes: 10 additions & 0 deletions examples/v2_aws-integration_CreateAWSAccount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use datadog_api_client::datadogV2::model::AWSAccountPartition;
use datadog_api_client::datadogV2::model::AWSAccountType;
use datadog_api_client::datadogV2::model::AWSAuthConfig;
use datadog_api_client::datadogV2::model::AWSAuthConfigKeys;
use datadog_api_client::datadogV2::model::AWSCCMConfig;
use datadog_api_client::datadogV2::model::AWSLambdaForwarderConfig;
use datadog_api_client::datadogV2::model::AWSLambdaForwarderConfigLogSourceConfig;
use datadog_api_client::datadogV2::model::AWSLogSourceTagFilter;
Expand All @@ -16,6 +17,7 @@ use datadog_api_client::datadogV2::model::AWSMetricsConfig;
use datadog_api_client::datadogV2::model::AWSNamespaceTagFilter;
use datadog_api_client::datadogV2::model::AWSResourcesConfig;
use datadog_api_client::datadogV2::model::AWSTracesConfig;
use datadog_api_client::datadogV2::model::DataExportConfig;

#[tokio::main]
async fn main() {
Expand All @@ -29,6 +31,14 @@ async fn main() {
AWSAccountPartition::AWS,
)
.account_tags(Some(vec!["key:value".to_string()]))
.ccm_config(AWSCCMConfig::new().data_export_configs(vec![
DataExportConfig::new()
.bucket_name("my-bucket".to_string())
.bucket_region("us-east-1".to_string())
.report_name("my-report".to_string())
.report_prefix("reports".to_string())
.report_type("CUR2.0".to_string())
]))
.logs_config(
AWSLogsConfig::new().lambda_forwarder(
AWSLambdaForwarderConfig::new()
Expand Down
10 changes: 10 additions & 0 deletions examples/v2_aws-integration_CreateAWSAccount_1716720881.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use datadog_api_client::datadogV2::model::AWSAccountPartition;
use datadog_api_client::datadogV2::model::AWSAccountType;
use datadog_api_client::datadogV2::model::AWSAuthConfig;
use datadog_api_client::datadogV2::model::AWSAuthConfigRole;
use datadog_api_client::datadogV2::model::AWSCCMConfig;
use datadog_api_client::datadogV2::model::AWSLambdaForwarderConfig;
use datadog_api_client::datadogV2::model::AWSLambdaForwarderConfigLogSourceConfig;
use datadog_api_client::datadogV2::model::AWSLogSourceTagFilter;
Expand All @@ -16,6 +17,7 @@ use datadog_api_client::datadogV2::model::AWSMetricsConfig;
use datadog_api_client::datadogV2::model::AWSNamespaceTagFilter;
use datadog_api_client::datadogV2::model::AWSResourcesConfig;
use datadog_api_client::datadogV2::model::AWSTracesConfig;
use datadog_api_client::datadogV2::model::DataExportConfig;

#[tokio::main]
async fn main() {
Expand All @@ -28,6 +30,14 @@ async fn main() {
AWSAccountPartition::AWS,
)
.account_tags(Some(vec!["key:value".to_string()]))
.ccm_config(AWSCCMConfig::new().data_export_configs(vec![
DataExportConfig::new()
.bucket_name("my-bucket".to_string())
.bucket_region("us-east-1".to_string())
.report_name("my-report".to_string())
.report_prefix("reports".to_string())
.report_type("CUR2.0".to_string())
]))
.logs_config(
AWSLogsConfig::new().lambda_forwarder(
AWSLambdaForwarderConfig::new()
Expand Down
15 changes: 15 additions & 0 deletions examples/v2_aws-integration_UpdateAWSAccount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use datadog_api_client::datadogV2::model::AWSAccountUpdateRequestAttributes;
use datadog_api_client::datadogV2::model::AWSAccountUpdateRequestData;
use datadog_api_client::datadogV2::model::AWSAuthConfig;
use datadog_api_client::datadogV2::model::AWSAuthConfigRole;
use datadog_api_client::datadogV2::model::AWSCCMConfig;
use datadog_api_client::datadogV2::model::AWSLambdaForwarderConfig;
use datadog_api_client::datadogV2::model::AWSLambdaForwarderConfigLogSourceConfig;
use datadog_api_client::datadogV2::model::AWSLogSourceTagFilter;
Expand All @@ -16,6 +17,7 @@ use datadog_api_client::datadogV2::model::AWSMetricsConfig;
use datadog_api_client::datadogV2::model::AWSNamespaceTagFilter;
use datadog_api_client::datadogV2::model::AWSResourcesConfig;
use datadog_api_client::datadogV2::model::AWSTracesConfig;
use datadog_api_client::datadogV2::model::DataExportConfig;

#[tokio::main]
async fn main() {
Expand All @@ -32,6 +34,19 @@ async fn main() {
),
)
.aws_partition(AWSAccountPartition::AWS)
.ccm_config(
AWSCCMConfig
::new().data_export_configs(
vec![
DataExportConfig::new()
.bucket_name("updated-bucket".to_string())
.bucket_region("us-west-2".to_string())
.report_name("updated-report".to_string())
.report_prefix("cost-reports".to_string())
.report_type("CUR2.0".to_string())
],
),
)
.logs_config(
AWSLogsConfig
::new().lambda_forwarder(
Expand Down
4 changes: 4 additions & 0 deletions src/datadogV2/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3006,6 +3006,10 @@ pub mod model_aws_regions_include_only;
pub use self::model_aws_regions_include_only::AWSRegionsIncludeOnly;
pub mod model_aws_regions;
pub use self::model_aws_regions::AWSRegions;
pub mod model_awsccm_config;
pub use self::model_awsccm_config::AWSCCMConfig;
pub mod model_data_export_config;
pub use self::model_data_export_config::DataExportConfig;
pub mod model_aws_logs_config;
pub use self::model_aws_logs_config::AWSLogsConfig;
pub mod model_aws_lambda_forwarder_config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct AWSAccountCreateRequestAttributes {
/// AWS Regions to collect data from. Defaults to `include_all`.
#[serde(rename = "aws_regions")]
pub aws_regions: Option<crate::datadogV2::model::AWSRegions>,
/// AWS Cloud Cost Management config.
#[serde(rename = "ccm_config")]
pub ccm_config: Option<crate::datadogV2::model::AWSCCMConfig>,
/// AWS Logs Collection config.
#[serde(rename = "logs_config")]
pub logs_config: Option<crate::datadogV2::model::AWSLogsConfig>,
Expand Down Expand Up @@ -63,6 +66,7 @@ impl AWSAccountCreateRequestAttributes {
aws_account_id,
aws_partition,
aws_regions: None,
ccm_config: None,
logs_config: None,
metrics_config: None,
resources_config: None,
Expand All @@ -82,6 +86,11 @@ impl AWSAccountCreateRequestAttributes {
self
}

pub fn ccm_config(mut self, value: crate::datadogV2::model::AWSCCMConfig) -> Self {
self.ccm_config = Some(value);
self
}

pub fn logs_config(mut self, value: crate::datadogV2::model::AWSLogsConfig) -> Self {
self.logs_config = Some(value);
self
Expand Down Expand Up @@ -133,6 +142,7 @@ impl<'de> Deserialize<'de> for AWSAccountCreateRequestAttributes {
let mut aws_account_id: Option<String> = None;
let mut aws_partition: Option<crate::datadogV2::model::AWSAccountPartition> = None;
let mut aws_regions: Option<crate::datadogV2::model::AWSRegions> = None;
let mut ccm_config: Option<crate::datadogV2::model::AWSCCMConfig> = None;
let mut logs_config: Option<crate::datadogV2::model::AWSLogsConfig> = None;
let mut metrics_config: Option<crate::datadogV2::model::AWSMetricsConfig> = None;
let mut resources_config: Option<crate::datadogV2::model::AWSResourcesConfig> =
Expand Down Expand Up @@ -197,6 +207,12 @@ impl<'de> Deserialize<'de> for AWSAccountCreateRequestAttributes {
}
}
}
"ccm_config" => {
if v.is_null() {
continue;
}
ccm_config = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"logs_config" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -245,6 +261,7 @@ impl<'de> Deserialize<'de> for AWSAccountCreateRequestAttributes {
aws_account_id,
aws_partition,
aws_regions,
ccm_config,
logs_config,
metrics_config,
resources_config,
Expand Down
17 changes: 17 additions & 0 deletions src/datadogV2/model/model_aws_account_response_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct AWSAccountResponseAttributes {
/// AWS Regions to collect data from. Defaults to `include_all`.
#[serde(rename = "aws_regions")]
pub aws_regions: Option<crate::datadogV2::model::AWSRegions>,
/// AWS Cloud Cost Management config.
#[serde(rename = "ccm_config")]
pub ccm_config: Option<crate::datadogV2::model::AWSCCMConfig>,
/// Timestamp of when the account integration was created.
#[serde(rename = "created_at")]
pub created_at: Option<chrono::DateTime<chrono::Utc>>,
Expand Down Expand Up @@ -65,6 +68,7 @@ impl AWSAccountResponseAttributes {
aws_account_id,
aws_partition: None,
aws_regions: None,
ccm_config: None,
created_at: None,
logs_config: None,
metrics_config: None,
Expand Down Expand Up @@ -96,6 +100,11 @@ impl AWSAccountResponseAttributes {
self
}

pub fn ccm_config(mut self, value: crate::datadogV2::model::AWSCCMConfig) -> Self {
self.ccm_config = Some(value);
self
}

pub fn created_at(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
self.created_at = Some(value);
self
Expand Down Expand Up @@ -157,6 +166,7 @@ impl<'de> Deserialize<'de> for AWSAccountResponseAttributes {
let mut aws_account_id: Option<String> = None;
let mut aws_partition: Option<crate::datadogV2::model::AWSAccountPartition> = None;
let mut aws_regions: Option<crate::datadogV2::model::AWSRegions> = None;
let mut ccm_config: Option<crate::datadogV2::model::AWSCCMConfig> = None;
let mut created_at: Option<chrono::DateTime<chrono::Utc>> = None;
let mut logs_config: Option<crate::datadogV2::model::AWSLogsConfig> = None;
let mut metrics_config: Option<crate::datadogV2::model::AWSMetricsConfig> = None;
Expand Down Expand Up @@ -229,6 +239,12 @@ impl<'de> Deserialize<'de> for AWSAccountResponseAttributes {
}
}
}
"ccm_config" => {
if v.is_null() {
continue;
}
ccm_config = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"created_at" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -286,6 +302,7 @@ impl<'de> Deserialize<'de> for AWSAccountResponseAttributes {
aws_account_id,
aws_partition,
aws_regions,
ccm_config,
created_at,
logs_config,
metrics_config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct AWSAccountUpdateRequestAttributes {
/// AWS Regions to collect data from. Defaults to `include_all`.
#[serde(rename = "aws_regions")]
pub aws_regions: Option<crate::datadogV2::model::AWSRegions>,
/// AWS Cloud Cost Management config.
#[serde(rename = "ccm_config")]
pub ccm_config: Option<crate::datadogV2::model::AWSCCMConfig>,
/// AWS Logs Collection config.
#[serde(rename = "logs_config")]
pub logs_config: Option<crate::datadogV2::model::AWSLogsConfig>,
Expand Down Expand Up @@ -59,6 +62,7 @@ impl AWSAccountUpdateRequestAttributes {
aws_account_id,
aws_partition: None,
aws_regions: None,
ccm_config: None,
logs_config: None,
metrics_config: None,
resources_config: None,
Expand Down Expand Up @@ -88,6 +92,11 @@ impl AWSAccountUpdateRequestAttributes {
self
}

pub fn ccm_config(mut self, value: crate::datadogV2::model::AWSCCMConfig) -> Self {
self.ccm_config = Some(value);
self
}

pub fn logs_config(mut self, value: crate::datadogV2::model::AWSLogsConfig) -> Self {
self.logs_config = Some(value);
self
Expand Down Expand Up @@ -139,6 +148,7 @@ impl<'de> Deserialize<'de> for AWSAccountUpdateRequestAttributes {
let mut aws_account_id: Option<String> = None;
let mut aws_partition: Option<crate::datadogV2::model::AWSAccountPartition> = None;
let mut aws_regions: Option<crate::datadogV2::model::AWSRegions> = None;
let mut ccm_config: Option<crate::datadogV2::model::AWSCCMConfig> = None;
let mut logs_config: Option<crate::datadogV2::model::AWSLogsConfig> = None;
let mut metrics_config: Option<crate::datadogV2::model::AWSMetricsConfig> = None;
let mut resources_config: Option<crate::datadogV2::model::AWSResourcesConfig> =
Expand Down Expand Up @@ -209,6 +219,12 @@ impl<'de> Deserialize<'de> for AWSAccountUpdateRequestAttributes {
}
}
}
"ccm_config" => {
if v.is_null() {
continue;
}
ccm_config = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"logs_config" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -253,6 +269,7 @@ impl<'de> Deserialize<'de> for AWSAccountUpdateRequestAttributes {
aws_account_id,
aws_partition,
aws_regions,
ccm_config,
logs_config,
metrics_config,
resources_config,
Expand Down
Loading