

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Application Auto Scaling 的目标跟踪扩展策略 AWS CLI
<a name="delete-target-tracking-policy"></a>

在使用完目标跟踪扩缩策略后，您可以使用 [delete-scaling-policy](https://docs.aws.amazon.com/cli/latest/reference/application-autoscaling/delete-scaling-policy.html) 命令删除该策略。

以下命令将删除指定 Spot 队组请求的目标跟踪扩展策略。它还会删除 Application Auto Scaling 代表你创建的 CloudWatch 警报。

**Linux、macOS 或 Unix**

```
aws application-autoscaling delete-scaling-policy --service-namespace {{ec2}} \
  --scalable-dimension {{ec2:spot-fleet-request:TargetCapacity}} \
  --resource-id {{spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE}} \
  --policy-name {{cpu50-target-tracking-scaling-policy}}
```

**Windows**

```
aws application-autoscaling delete-scaling-policy --service-namespace {{ec2}} ^
  --scalable-dimension {{ec2:spot-fleet-request:TargetCapacity}} ^
  --resource-id {{spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE}} ^
  --policy-name {{cpu50-target-tracking-scaling-policy}}
```