Skip to content

Commit

Permalink
Fix enable vs disable metrics snippet names
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed Sep 11, 2023
1 parent 69e6130 commit bb65de7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust_dev_preview/examples/auto-scaling/src/scenario.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,15 @@ impl AutoScalingScenario {
// snippet-end:[rust.autoscaling.scenario.scale_desired_capacity]

pub async fn scale_group_to_zero(&self) -> Result<(), anyhow::Error> {
// snippet-start:[rust.autoscaling.scenario.enable_metrics_collection]
// snippet-start:[rust.autoscaling.scenario.disable_metrics_collection]
// If this fails it's fine, just means there are extra cloudwatch metrics events for the scale-down.
let _ = self
.autoscaling
.disable_metrics_collection()
.auto_scaling_group_name(self.auto_scaling_group_name.clone())
.send()
.await;
// snippet-end:[rust.autoscaling.scenario.enable_metrics_collection]
// snippet-end:[rust.autoscaling.scenario.disable_metrics_collection]

// 12. DeleteAutoScalingGroup (to delete the group you must stop all instances):
// UpdateAutoScalingGroup with MinSize=0
Expand Down

0 comments on commit bb65de7

Please sign in to comment.