-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[examples] Sync SDK examples from
awsdocs/aws-doc-sdk-examples
Includes commit(s): b7635b1ab88285a744547c4aa33b6ba8bf0a1c57 9465b36910cdc1962dadfe53af2ce31098a7abd8 a48be99cf3e1e920698bbbd4fe5c22c4f9bef279 d73bd946755cb53a0984af323e6bc0817bf5c9f6 a29f4e9d999254adf8b3594ad8904e781ab01f1b e68209ef191d825e7b19dd5b0ea84a980df54922 8595338924aae24aa9815e26d8b536a231b52e78 8d51b94f33b95667b76a2232762560304a28b6e5 9f08f276537a38dc094727f1ad0b0ceacbb1dc7b Co-authored-by: David Souther <[email protected]> Co-authored-by: Eric Shepherd <[email protected]> Co-authored-by: John DiSanti <[email protected]>
- Loading branch information
1 parent
b6063d3
commit 6f2a0fa
Showing
98 changed files
with
923 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
examples/cross_service/photo_asset_management/tests/test_upload_part.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
use aws_sdk_rds::Client; | ||
|
||
#[derive(Debug)] | ||
struct Error(String); | ||
impl std::fmt::Display for Error { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
write!(f, "{}", self.0) | ||
} | ||
} | ||
impl std::error::Error for Error {} | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Error> { | ||
tracing_subscriber::fmt::init(); | ||
let sdk_config = aws_config::from_env().load().await; | ||
let client = Client::new(&sdk_config); | ||
|
||
let describe_db_clusters_output = client | ||
.describe_db_clusters() | ||
.send() | ||
.await | ||
.map_err(|e| Error(e.to_string()))?; | ||
println!( | ||
"Found {} clusters:", | ||
describe_db_clusters_output.db_clusters().len() | ||
); | ||
for cluster in describe_db_clusters_output.db_clusters() { | ||
let name = cluster.database_name().unwrap_or("Unknown"); | ||
let engine = cluster.engine().unwrap_or("Unknown"); | ||
let id = cluster.db_cluster_identifier().unwrap_or("Unknown"); | ||
let class = cluster.db_cluster_instance_class().unwrap_or("Unknown"); | ||
println!("\tDatabase: {name}",); | ||
println!("\t Engine: {engine}",); | ||
println!("\t ID: {id}",); | ||
println!("\tInstance: {class}",); | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.