Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Retrieve attributes that belongs to an Amazon RDS account using an Amazon SDK
The following code examples show how to retrieve attributes that belong to an Amazon RDS account.
- Java
-
- SDK for Java 2.x
-
public static void getAccountAttributes(RdsClient rdsClient) {
try {
DescribeAccountAttributesResponse response = rdsClient.describeAccountAttributes();
List<AccountQuota> quotasList = response.accountQuotas();
for (AccountQuota quotas: quotasList) {
System.out.println("Name is: "+quotas.accountQuotaName());
System.out.println("Max value is " +quotas.max());
}
} catch (RdsException e) {
System.out.println(e.getLocalizedMessage());
System.exit(1);
}
}
- Kotlin
-
- SDK for Kotlin
-
This is prerelease documentation for a feature in preview release. It is subject to change.
suspend fun getAccountAttributes() {
RdsClient { region = "us-west-2" }.use { rdsClient ->
val response = rdsClient.describeAccountAttributes(DescribeAccountAttributesRequest {})
response.accountQuotas?.forEach { quotas ->
val response = response.accountQuotas
println("Name is: ${quotas.accountQuotaName}")
println("Max value is ${quotas.max}")
}
}
}
For a complete list of Amazon SDK developer guides and code examples, see
Using this service with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.