

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# `PollForSourceChanges` 參數的有效設定
<a name="PollForSourceChanges-defaults"></a>

`PollForSourceChanges` 參數預設值取決於用來建立管道的方法，如下表中所述。在許多情況下，`PollForSourceChanges` 參數會預設為 True，而且必須停用。

當 `PollForSourceChanges` 參數預設為 true 時，您應該執行下列動作：
+ 將 `PollForSourceChanges` 參數新增至 JSON 檔案或 CloudFormation 範本。
+ 建立變更偵測資源 (CloudWatch Events 規則，如適用）。
+ 將 `PollForSourceChanges` 參數設為 false。
**注意**  
如果您建立 CloudWatch Events 規則或 Webhook，您必須將 參數設定為 false，以避免觸發管道多次。

  `PollForSourceChanges` 參數不會用於 Amazon ECR 來源動作。
+   
**`PollForSourceChanges` 參數預設值**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/codepipeline/latest/userguide/PollForSourceChanges-defaults.html)