diff --git a/cpp/example_code/aurora/README.md b/cpp/example_code/aurora/README.md index 07d55b24707..a63d6b76fce 100644 --- a/cpp/example_code/aurora/README.md +++ b/cpp/example_code/aurora/README.md @@ -50,9 +50,9 @@ Code excerpts that show you how to call individual service functions. - [Create a DB cluster parameter group](getting_started_with_db_clusters.cpp#L333) (`CreateDBClusterParameterGroup`) - [Create a DB cluster snapshot](getting_started_with_db_clusters.cpp#L661) (`CreateDBClusterSnapshot`) - [Create a DB instance in a DB cluster](getting_started_with_db_clusters.cpp#L588) (`CreateDBInstance`) -- [Delete a DB cluster](getting_started_with_db_clusters.cpp#L1031) (`DeleteDBCluster`) -- [Delete a DB cluster parameter group](getting_started_with_db_clusters.cpp#L1101) (`DeleteDBClusterParameterGroup`) -- [Delete a DB instance](getting_started_with_db_clusters.cpp#L1001) (`DeleteDBInstance`) +- [Delete a DB cluster](getting_started_with_db_clusters.cpp#L1033) (`DeleteDBCluster`) +- [Delete a DB cluster parameter group](getting_started_with_db_clusters.cpp#L1103) (`DeleteDBClusterParameterGroup`) +- [Delete a DB instance](getting_started_with_db_clusters.cpp#L1003) (`DeleteDBInstance`) - [Describe DB cluster parameter groups](getting_started_with_db_clusters.cpp#L295) (`DescribeDBClusterParameterGroups`) - [Describe DB cluster snapshots](getting_started_with_db_clusters.cpp#L701) (`DescribeDBClusterSnapshots`) - [Describe DB clusters](getting_started_with_db_clusters.cpp#L746) (`DescribeDBClusters`) diff --git a/cpp/example_code/aurora/getting_started_with_db_clusters.cpp b/cpp/example_code/aurora/getting_started_with_db_clusters.cpp index 2bd6aefa4f4..26e87b56d2e 100644 --- a/cpp/example_code/aurora/getting_started_with_db_clusters.cpp +++ b/cpp/example_code/aurora/getting_started_with_db_clusters.cpp @@ -954,7 +954,9 @@ bool AwsDoc::Aurora::chooseDBInstanceClass(const Aws::String &engine, outcome.GetResult().GetOrderableDBInstanceOptions(); for (const Aws::RDS::Model::OrderableDBInstanceOption &option: options) { const Aws::String &instanceClass = option.GetDBInstanceClass(); - instanceClasses.push_back(instanceClass); + if (std::find(instanceClasses.begin(), instanceClasses.end(), instanceClass) == instanceClasses.end()) { + instanceClasses.push_back(instanceClass); + } } marker = outcome.GetResult().GetMarker(); }