Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Add cloudwatchlogs client
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Madsen authored and martinjlowm committed Jun 20, 2023
1 parent c58b96e commit ce2e8aa
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ aws-config = { version = "0.55", optional = true }
aws-sdk-apigateway = { version = "0.27", optional = true }
aws-sdk-cloudformation = { version = "0.27", optional = true }
aws-sdk-cloudwatch = { version = "0.27", optional = true }
aws-sdk-cloudwatchlogs = { version = "0.27", optional = true }
aws-sdk-cognitoidentityprovider = { version = "0.27", optional = true }
aws-sdk-dynamodb = { version = "0.27", optional = true }
aws-sdk-dynamodbstreams = { version = "0.27", optional = true }
Expand Down Expand Up @@ -176,6 +177,13 @@ services_cloudwatch = [
"aws-credential-types",
"cached",
]
services_cloudwatchlogs = [
"aws-config",
"aws-sdk-cloudwatchlogs",
"aws-types",
"aws-credential-types",
"cached",
]
services_cognitoidentityprovider = [
"aws-config",
"aws-sdk-cognitoidentityprovider",
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub mod misc;
feature = "services_apigateway",
feature = "services_cloudformation",
feature = "services_cloudwatch",
feature = "services_cloudwatchlogs",
feature = "services_cognitoidentityprovider",
feature = "services_dynamodb",
feature = "services_eventbridge",
Expand Down
11 changes: 11 additions & 0 deletions src/services/cloudwatchlogs.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use crate::services::in_region;
use aws_sdk_cloudwatchlogs::Client as CloudWatchLogsClient;

// Re-export
pub use aws_sdk_cloudwatchlogs;
use cached::proc_macro::cached;

#[cached]
pub async fn cloudwatchlogs(region: Option<&'static str>) -> CloudWatchLogsClient {
CloudWatchLogsClient::new(&in_region(region).await)
}
3 changes: 3 additions & 0 deletions src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ pub mod cloudformation;
#[cfg(feature = "services_cloudwatch")]
pub mod cloudwatch;

#[cfg(feature = "services_cloudwatchlogs")]
pub mod cloudwatchlogs;

#[cfg(feature = "services_cognitoidentityprovider")]
pub mod cognitoidentityprovider;

Expand Down

0 comments on commit ce2e8aa

Please sign in to comment.