DescribeDatabase()
Retrieves a database’s metadata and properties.
pub async fn describe_database(&self, request: DescribeDatabaseRequest) -> Result<DescribeDatabaseResponse>
Request Syntax
let request = DescribeDatabaseRequest::builder()
.database_name("my_database")
.build()?;
REQUEST FIELDS:
database_name: StringName of the database to describe. Required.
RETURN TYPE:
Result
RETURNS:
A DescribeDatabaseResponse containing the database details. Returns an Error if the operation fails.
DescribeDatabaseResponse
database_name() // -> &str
database_id() // -> i64
created_timestamp() // -> u64
properties() // -> &HashMap<String, String>
METHODS:
database_name()(&str) -The name of the database.
database_id()(i64) -The ID of the database.
created_timestamp()(u64) -The timestamp when the database was created.
properties()(&HashMap) - The properties of the database.
Example
let request = DescribeDatabaseRequest::builder()
.database_name("my_database")
.build()?;
let resp = client.describe_database(request).await?;
println!("properties: {:?}", resp.properties());