Amazon RDS Data Service examples using SDK for Rust - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Amazon RDS Data Service examples using SDK for Rust

The following code examples show you how to perform actions and implement common scenarios by using the AWS SDK for Rust with Amazon RDS Data Service.

Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.

Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.

Topics

Actions

The following code example shows how to use ExecuteStatement.

SDK for Rust
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

async fn query_cluster( client: &Client, cluster_arn: &str, query: &str, secret_arn: &str, ) -> Result<(), Error> { let st = client .execute_statement() .resource_arn(cluster_arn) .database("postgres") // Do not confuse this with db instance name .sql(query) .secret_arn(secret_arn); let result = st.send().await?; println!("{:?}", result); println!(); Ok(()) }