

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# スケーリングポリシーを一時的に無効にする
<a name="endpoint-auto-scaling-suspend-scaling-activities"></a>

自動スケーリングを設定した後、スケーリングポリシー (動的スケーリング) による干渉を受けずに問題を調査する必要がある場合は、次のオプションがあります。
+ CLI コマンド [register-scalable-target](https://docs.aws.amazon.com/cli/latest/reference/application-autoscaling/register-scalable-target.html) または API アクション [RegisterScalableTarget](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) を呼び出して `DynamicScalingInSuspended` と `DynamicScalingOutSuspended` の両方にブール値を指定することで、スケーリングアクティビティを一時的に停止してから再開します。  
**Example**  

  次の例は、`{{my-endpoint}}` エンドポイントで実行されている `{{my-variant}}` という名前のバリアントのスケーリングポリシーを一時停止する方法を示しています。

  ```
  aws application-autoscaling register-scalable-target \
    --service-namespace sagemaker \
    --resource-id endpoint/{{my-endpoint}}/variant/{{my-variant}} \
    --scalable-dimension sagemaker:variant:DesiredInstanceCount \
    --suspended-state '{"DynamicScalingInSuspended":true,"DynamicScalingOutSuspended":true}'
  ```
+ ポリシーのスケールイン部分を無効にして、特定のターゲット追跡スケーリングポリシーでバリアントのスケールインが行われないようにします。この方法を使うと、スケーリングポリシーによってインスタンスが削除されることがなくなる一方で、インスタンスの作成は必要に応じて行われます。

  CLI コマンド [put-scaling-policy](https://docs.aws.amazon.com/cli/latest/reference/application-autoscaling/put-scaling-policy.html) または API アクション [PutScalingPolicy](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PutScalingPolicy.html) を使って `DisableScaleIn` のブール値を指定してポリシーを編集することで、スケールインアクティビティを一時的に無効にしてから有効にします。  
**Example**  

  以下は、スケールアウトするがスケールインしないスケーリングポリシーのターゲット追跡設定の例です。

  ```
  {
      "TargetValue": {{70.0}},
      "PredefinedMetricSpecification":
      {
          "PredefinedMetricType": "{{SageMakerVariantInvocationsPerInstance}}"
      },
      "DisableScaleIn": {{true}}
  }
  ```