Skip to content

Commit fbc56f2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b6977c5 of spec repo
1 parent 933354a commit fbc56f2

13 files changed

+506
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59638,6 +59638,39 @@ paths:
5963859638
summary: Get AWS integration IAM permissions
5963959639
tags:
5964059640
- AWS Integration
59641+
/api/v2/integration/aws/iam_permissions/resource_collection:
59642+
get:
59643+
description: Get all resource collection AWS IAM permissions required for the
59644+
AWS integration.
59645+
operationId: GetAWSIntegrationIAMPermissionsResourceCollection
59646+
responses:
59647+
'200':
59648+
content:
59649+
application/json:
59650+
schema:
59651+
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponse'
59652+
description: AWS integration resource collection IAM permissions.
59653+
'429':
59654+
$ref: '#/components/responses/TooManyRequestsResponse'
59655+
summary: Get resource collection IAM permissions
59656+
tags:
59657+
- AWS Integration
59658+
/api/v2/integration/aws/iam_permissions/standard:
59659+
get:
59660+
description: Get all standard AWS IAM permissions required for the AWS integration.
59661+
operationId: GetAWSIntegrationIAMPermissionsStandard
59662+
responses:
59663+
'200':
59664+
content:
59665+
application/json:
59666+
schema:
59667+
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponse'
59668+
description: AWS integration standard IAM permissions.
59669+
'429':
59670+
$ref: '#/components/responses/TooManyRequestsResponse'
59671+
summary: Get AWS integration standard IAM permissions
59672+
tags:
59673+
- AWS Integration
5964159674
/api/v2/integration/aws/logs/services:
5964259675
get:
5964359676
description: Get a list of AWS services that can send logs to Datadog.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Get resource collection IAM permissions returns "AWS integration resource
2+
// collection IAM permissions." response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = AWSIntegrationAPI::with_config(configuration);
10+
let resp = api
11+
.get_aws_integration_iam_permissions_resource_collection()
12+
.await;
13+
if let Ok(value) = resp {
14+
println!("{:#?}", value);
15+
} else {
16+
println!("{:#?}", resp.unwrap_err());
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Get resource collection IAM permissions returns "AWS IAM Permissions object"
2+
// response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = AWSIntegrationAPI::with_config(configuration);
10+
let resp = api
11+
.get_aws_integration_iam_permissions_resource_collection()
12+
.await;
13+
if let Ok(value) = resp {
14+
println!("{:#?}", value);
15+
} else {
16+
println!("{:#?}", resp.unwrap_err());
17+
}
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Get AWS integration standard IAM permissions returns "AWS integration standard
2+
// IAM permissions." response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = AWSIntegrationAPI::with_config(configuration);
10+
let resp = api.get_aws_integration_iam_permissions_standard().await;
11+
if let Ok(value) = resp {
12+
println!("{:#?}", value);
13+
} else {
14+
println!("{:#?}", resp.unwrap_err());
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Get AWS integration standard IAM permissions returns "AWS IAM Permissions
2+
// object" response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = AWSIntegrationAPI::with_config(configuration);
10+
let resp = api.get_aws_integration_iam_permissions_standard().await;
11+
if let Ok(value) = resp {
12+
println!("{:#?}", value);
13+
} else {
14+
println!("{:#?}", resp.unwrap_err());
15+
}
16+
}

src/datadogV2/api/api_aws_integration.rs

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@ pub enum GetAWSIntegrationIAMPermissionsError {
6666
UnknownValue(serde_json::Value),
6767
}
6868

69+
/// GetAWSIntegrationIAMPermissionsResourceCollectionError is a struct for typed errors of method [`AWSIntegrationAPI::get_aws_integration_iam_permissions_resource_collection`]
70+
#[derive(Debug, Clone, Serialize, Deserialize)]
71+
#[serde(untagged)]
72+
pub enum GetAWSIntegrationIAMPermissionsResourceCollectionError {
73+
APIErrorResponse(crate::datadogV2::model::APIErrorResponse),
74+
UnknownValue(serde_json::Value),
75+
}
76+
77+
/// GetAWSIntegrationIAMPermissionsStandardError is a struct for typed errors of method [`AWSIntegrationAPI::get_aws_integration_iam_permissions_standard`]
78+
#[derive(Debug, Clone, Serialize, Deserialize)]
79+
#[serde(untagged)]
80+
pub enum GetAWSIntegrationIAMPermissionsStandardError {
81+
APIErrorResponse(crate::datadogV2::model::APIErrorResponse),
82+
UnknownValue(serde_json::Value),
83+
}
84+
6985
/// ListAWSAccountsError is a struct for typed errors of method [`AWSIntegrationAPI::list_aws_accounts`]
7086
#[derive(Debug, Clone, Serialize, Deserialize)]
7187
#[serde(untagged)]
@@ -725,6 +741,226 @@ impl AWSIntegrationAPI {
725741
}
726742
}
727743

744+
/// Get all resource collection AWS IAM permissions required for the AWS integration.
745+
pub async fn get_aws_integration_iam_permissions_resource_collection(
746+
&self,
747+
) -> Result<
748+
crate::datadogV2::model::AWSIntegrationIamPermissionsResponse,
749+
datadog::Error<GetAWSIntegrationIAMPermissionsResourceCollectionError>,
750+
> {
751+
match self
752+
.get_aws_integration_iam_permissions_resource_collection_with_http_info()
753+
.await
754+
{
755+
Ok(response_content) => {
756+
if let Some(e) = response_content.entity {
757+
Ok(e)
758+
} else {
759+
Err(datadog::Error::Serde(serde::de::Error::custom(
760+
"response content was None",
761+
)))
762+
}
763+
}
764+
Err(err) => Err(err),
765+
}
766+
}
767+
768+
/// Get all resource collection AWS IAM permissions required for the AWS integration.
769+
pub async fn get_aws_integration_iam_permissions_resource_collection_with_http_info(
770+
&self,
771+
) -> Result<
772+
datadog::ResponseContent<crate::datadogV2::model::AWSIntegrationIamPermissionsResponse>,
773+
datadog::Error<GetAWSIntegrationIAMPermissionsResourceCollectionError>,
774+
> {
775+
let local_configuration = &self.config;
776+
let operation_id = "v2.get_aws_integration_iam_permissions_resource_collection";
777+
778+
let local_client = &self.client;
779+
780+
let local_uri_str = format!(
781+
"{}/api/v2/integration/aws/iam_permissions/resource_collection",
782+
local_configuration.get_operation_host(operation_id)
783+
);
784+
let mut local_req_builder =
785+
local_client.request(reqwest::Method::GET, local_uri_str.as_str());
786+
787+
// build headers
788+
let mut headers = HeaderMap::new();
789+
headers.insert("Accept", HeaderValue::from_static("application/json"));
790+
791+
// build user agent
792+
match HeaderValue::from_str(local_configuration.user_agent.as_str()) {
793+
Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent),
794+
Err(e) => {
795+
log::warn!("Failed to parse user agent header: {e}, falling back to default");
796+
headers.insert(
797+
reqwest::header::USER_AGENT,
798+
HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()),
799+
)
800+
}
801+
};
802+
803+
// build auth
804+
if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") {
805+
headers.insert(
806+
"DD-API-KEY",
807+
HeaderValue::from_str(local_key.key.as_str())
808+
.expect("failed to parse DD-API-KEY header"),
809+
);
810+
};
811+
if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") {
812+
headers.insert(
813+
"DD-APPLICATION-KEY",
814+
HeaderValue::from_str(local_key.key.as_str())
815+
.expect("failed to parse DD-APPLICATION-KEY header"),
816+
);
817+
};
818+
819+
local_req_builder = local_req_builder.headers(headers);
820+
let local_req = local_req_builder.build()?;
821+
log::debug!("request content: {:?}", local_req.body());
822+
let local_resp = local_client.execute(local_req).await?;
823+
824+
let local_status = local_resp.status();
825+
let local_content = local_resp.text().await?;
826+
log::debug!("response content: {}", local_content);
827+
828+
if !local_status.is_client_error() && !local_status.is_server_error() {
829+
match serde_json::from_str::<
830+
crate::datadogV2::model::AWSIntegrationIamPermissionsResponse,
831+
>(&local_content)
832+
{
833+
Ok(e) => {
834+
return Ok(datadog::ResponseContent {
835+
status: local_status,
836+
content: local_content,
837+
entity: Some(e),
838+
})
839+
}
840+
Err(e) => return Err(datadog::Error::Serde(e)),
841+
};
842+
} else {
843+
let local_entity: Option<GetAWSIntegrationIAMPermissionsResourceCollectionError> =
844+
serde_json::from_str(&local_content).ok();
845+
let local_error = datadog::ResponseContent {
846+
status: local_status,
847+
content: local_content,
848+
entity: local_entity,
849+
};
850+
Err(datadog::Error::ResponseError(local_error))
851+
}
852+
}
853+
854+
/// Get all standard AWS IAM permissions required for the AWS integration.
855+
pub async fn get_aws_integration_iam_permissions_standard(
856+
&self,
857+
) -> Result<
858+
crate::datadogV2::model::AWSIntegrationIamPermissionsResponse,
859+
datadog::Error<GetAWSIntegrationIAMPermissionsStandardError>,
860+
> {
861+
match self
862+
.get_aws_integration_iam_permissions_standard_with_http_info()
863+
.await
864+
{
865+
Ok(response_content) => {
866+
if let Some(e) = response_content.entity {
867+
Ok(e)
868+
} else {
869+
Err(datadog::Error::Serde(serde::de::Error::custom(
870+
"response content was None",
871+
)))
872+
}
873+
}
874+
Err(err) => Err(err),
875+
}
876+
}
877+
878+
/// Get all standard AWS IAM permissions required for the AWS integration.
879+
pub async fn get_aws_integration_iam_permissions_standard_with_http_info(
880+
&self,
881+
) -> Result<
882+
datadog::ResponseContent<crate::datadogV2::model::AWSIntegrationIamPermissionsResponse>,
883+
datadog::Error<GetAWSIntegrationIAMPermissionsStandardError>,
884+
> {
885+
let local_configuration = &self.config;
886+
let operation_id = "v2.get_aws_integration_iam_permissions_standard";
887+
888+
let local_client = &self.client;
889+
890+
let local_uri_str = format!(
891+
"{}/api/v2/integration/aws/iam_permissions/standard",
892+
local_configuration.get_operation_host(operation_id)
893+
);
894+
let mut local_req_builder =
895+
local_client.request(reqwest::Method::GET, local_uri_str.as_str());
896+
897+
// build headers
898+
let mut headers = HeaderMap::new();
899+
headers.insert("Accept", HeaderValue::from_static("application/json"));
900+
901+
// build user agent
902+
match HeaderValue::from_str(local_configuration.user_agent.as_str()) {
903+
Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent),
904+
Err(e) => {
905+
log::warn!("Failed to parse user agent header: {e}, falling back to default");
906+
headers.insert(
907+
reqwest::header::USER_AGENT,
908+
HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()),
909+
)
910+
}
911+
};
912+
913+
// build auth
914+
if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") {
915+
headers.insert(
916+
"DD-API-KEY",
917+
HeaderValue::from_str(local_key.key.as_str())
918+
.expect("failed to parse DD-API-KEY header"),
919+
);
920+
};
921+
if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") {
922+
headers.insert(
923+
"DD-APPLICATION-KEY",
924+
HeaderValue::from_str(local_key.key.as_str())
925+
.expect("failed to parse DD-APPLICATION-KEY header"),
926+
);
927+
};
928+
929+
local_req_builder = local_req_builder.headers(headers);
930+
let local_req = local_req_builder.build()?;
931+
log::debug!("request content: {:?}", local_req.body());
932+
let local_resp = local_client.execute(local_req).await?;
933+
934+
let local_status = local_resp.status();
935+
let local_content = local_resp.text().await?;
936+
log::debug!("response content: {}", local_content);
937+
938+
if !local_status.is_client_error() && !local_status.is_server_error() {
939+
match serde_json::from_str::<
940+
crate::datadogV2::model::AWSIntegrationIamPermissionsResponse,
941+
>(&local_content)
942+
{
943+
Ok(e) => {
944+
return Ok(datadog::ResponseContent {
945+
status: local_status,
946+
content: local_content,
947+
entity: Some(e),
948+
})
949+
}
950+
Err(e) => return Err(datadog::Error::Serde(e)),
951+
};
952+
} else {
953+
let local_entity: Option<GetAWSIntegrationIAMPermissionsStandardError> =
954+
serde_json::from_str(&local_content).ok();
955+
let local_error = datadog::ResponseContent {
956+
status: local_status,
957+
content: local_content,
958+
entity: local_entity,
959+
};
960+
Err(datadog::Error::ResponseError(local_error))
961+
}
962+
}
963+
728964
/// Get a list of AWS Account Integration Configs.
729965
pub async fn list_aws_accounts(
730966
&self,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-17T18:27:22.560Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"http_interactions": [
3+
{
4+
"request": {
5+
"body": "",
6+
"headers": {
7+
"Accept": [
8+
"application/json"
9+
]
10+
},
11+
"method": "get",
12+
"uri": "https://api.datadoghq.com/api/v2/integration/aws/iam_permissions/standard"
13+
},
14+
"response": {
15+
"body": {
16+
"string": "{\"data\":{\"id\":\"permissions\",\"type\":\"permissions\",\"attributes\":{\"permissions\":[\"account:GetAccountInformation\",\"airflow:GetEnvironment\",\"airflow:ListEnvironments\",\"apigateway:GET\",\"appsync:ListGraphqlApis\",\"autoscaling:Describe*\",\"backup:List*\",\"batch:DescribeJobDefinitions\",\"bcm-data-exports:GetExport\",\"bcm-data-exports:ListExports\",\"budgets:ViewBudget\",\"cloudfront:GetDistributionConfig\",\"cloudfront:ListDistributions\",\"cloudtrail:DescribeTrails\",\"cloudtrail:GetTrail\",\"cloudtrail:GetTrailStatus\",\"cloudtrail:ListTrails\",\"cloudtrail:LookupEvents\",\"cloudwatch:Describe*\",\"cloudwatch:Get*\",\"cloudwatch:List*\",\"codebuild:BatchGetProjects\",\"codebuild:ListProjects\",\"codedeploy:BatchGet*\",\"codedeploy:List*\",\"cur:DescribeReportDefinitions\",\"directconnect:Describe*\",\"dms:DescribeReplicationInstances\",\"dynamodb:Describe*\",\"dynamodb:List*\",\"ec2:Describe*\",\"ecs:Describe*\",\"ecs:List*\",\"eks:DescribeCluster\",\"eks:ListClusters\",\"elasticache:Describe*\",\"elasticache:List*\",\"elasticfilesystem:DescribeAccessPoints\",\"elasticfilesystem:DescribeFileSystems\",\"elasticfilesystem:DescribeTags\",\"elasticloadbalancing:Describe*\",\"elasticmapreduce:Describe*\",\"elasticmapreduce:List*\",\"es:DescribeElasticsearchDomains\",\"es:ListDomainNames\",\"es:ListTags\",\"events:CreateEventBus\",\"fsx:DescribeFileSystems\",\"fsx:ListTagsForResource\",\"health:DescribeAffectedEntities\",\"health:DescribeEventDetails\",\"health:DescribeEvents\",\"iam:ListAccountAliases\",\"kinesis:Describe*\",\"kinesis:List*\",\"lambda:List*\",\"logs:DeleteSubscriptionFilter\",\"logs:DescribeDeliveries\",\"logs:DescribeDeliverySources\",\"logs:DescribeLogGroups\",\"logs:DescribeLogStreams\",\"logs:DescribeSubscriptionFilters\",\"logs:FilterLogEvents\",\"logs:GetDeliveryDestination\",\"logs:PutSubscriptionFilter\",\"logs:TestMetricFilter\",\"network-firewall:DescribeLoggingConfiguration\",\"network-firewall:ListFirewalls\",\"oam:ListAttachedLinks\",\"oam:ListSinks\",\"organizations:Describe*\",\"organizations:List*\",\"rds:Describe*\",\"rds:List*\",\"redshift-serverless:ListNamespaces\",\"redshift:DescribeClusters\",\"redshift:DescribeLoggingStatus\",\"route53:List*\",\"route53resolver:ListResolverQueryLogConfigs\",\"s3:GetBucketLocation\",\"s3:GetBucketLogging\",\"s3:GetBucketNotification\",\"s3:GetBucketTagging\",\"s3:ListAllMyBuckets\",\"s3:PutBucketNotification\",\"ses:Get*\",\"ses:List*\",\"sns:GetSubscriptionAttributes\",\"sns:List*\",\"sns:Publish\",\"sqs:ListQueues\",\"ssm:GetServiceSetting\",\"ssm:ListCommands\",\"states:DescribeStateMachine\",\"states:ListStateMachines\",\"support:DescribeTrustedAdvisor*\",\"support:RefreshTrustedAdvisorCheck\",\"tag:GetResources\",\"tag:GetTagKeys\",\"tag:GetTagValues\",\"timestream:DescribeEndpoints\",\"wafv2:ListLoggingConfigurations\",\"xray:BatchGetTraces\",\"xray:GetTraceSummaries\"]}}}",
17+
"encoding": null
18+
},
19+
"headers": {
20+
"Content-Type": [
21+
"application/vnd.api+json"
22+
]
23+
},
24+
"status": {
25+
"code": 200,
26+
"message": "OK"
27+
}
28+
},
29+
"recorded_at": "Wed, 17 Sep 2025 18:27:22 GMT"
30+
}
31+
],
32+
"recorded_with": "VCR 6.0.0"
33+
}

0 commit comments

Comments
 (0)