

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

# 使用 更新組織政策 AWS Organizations
<a name="orgs_policies_update"></a>

當您的政策需求變更時，您可以更新現有的政策。

本主題說明如何使用 更新政策 AWS Organizations。*政策*會定義您要套用至 群組的控制項 AWS 帳戶。

**Topics**
+ [更新服務控制政策 (SCP)](#update_policy)
+ [更新資源控制政策 (RCP)](#update_policy-rcp)
+ [更新宣告政策](#update-declarative-policy-procedure)
+ [更新備份政策](#update-backup-policy-procedure)
+ [更新標籤政策](#update-tag-policy-procedure)
+ [更新聊天應用程式政策](#update-chatbot-policy-procedure)
+ [更新 AI 服務選擇退出政策](#update-ai-opt-out-policy-procedure)
+ [更新 Security Hub 政策](#update-security-hub-policy-procedure)

## 更新服務控制政策 (SCP)
<a name="update_policy"></a>

登入到您組織的管理帳戶時，您可以重新命名或變更政策的內容。變更 SCP 的內容會立即影響所有連接帳戶中的任何使用者、群組和角色。

**最低許可**  
若要更新 SCP，您需要具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在 **[Service control policies](https://console.aws.amazon.com/organizations/v2/home/policies/service-control-policy)** (服務控制政策) 頁面上，選擇您要更新的政策名稱。

1. 在政策的詳細資訊頁面上，選擇 **Edit policy** (編輯政策)。

1. 進行下列任一或所有變更：
   + 您可以在 **Policy name** (政策名稱) 中輸入新名稱，來重新命名政策。
   + 您可以在 **Policy description** (政策描述) 輸入新文字，來變更描述。
   + 您可以在左側窗格中以 JSON 格式編輯政策，來編輯政策文字。或者，您可以在右側的編輯器中選擇陳述式，同時使用控制項來變更其元素。如需每個控制項的詳細資訊，請參閱本主題稍早介紹的[建立 SCP 程序](orgs_policies_create.md#create-an-scp)。

1. 完成時，請選擇**儲存變更**。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項命令來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "MyRenamedPolicy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/service_control_policy/p-i9j8k7l6m5",
              "Name": "MyRenamedPolicy",
              "Description": "Blocks all IAM actions",
              "Type": "SERVICE_CONTROL_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"Version\":\"2012-10-17\",		 	 	 \"Statement\":[{\"Sid\":\"Statement1\",\"Effect\":\"Deny\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
      }
  }
  ```

  下列範例會新增或變更服務控制政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --description "My new policy description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/service_control_policy/p-i9j8k7l6m5",
              "Name": "MyRenamedPolicy",
              "Description": "My new policy description",
              "Type": "SERVICE_CONTROL_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"Version\":\"2012-10-17\",		 	 	 \"Statement\":[{\"Sid\":\"Statement1\",\"Effect\":\"Deny\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
      }
  }
  ```

  下列範例會指定包含新 JSON 政策文字的檔案，以變更 SCP 的政策文件。

  ```
  $ aws organizations update-policy \
      --policy-id p-zlfw1r64 
      --content file://MyNewPolicyText.json
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/service_control_policy/p-i9j8k7l6m5",
              "Name": "MyRenamedPolicy",
              "Description": "My new policy description",
              "Type": "SERVICE_CONTROL_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"Version\":\"2012-10-17\",		 	 	 \"Statement\":[{\"Sid\":\"AModifiedPolicy\",\"Effect\":\"Deny\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
      }
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新資源控制政策 (RCP)
<a name="update_policy-rcp"></a>

登入到您組織的管理帳戶時，您可以重新命名或變更政策的內容。變更 RCP 的內容會立即影響所有連接帳戶中的任何資源。

**最低許可**  
若要更新 RCP，您需要執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在**資源控制政策**頁面上，選擇您要更新的政策名稱。

1. 在政策的詳細資訊頁面上，選擇 **Edit policy** (編輯政策)。

1. 進行下列任一或所有變更：
   + 您可以在 **Policy name** (政策名稱) 中輸入新名稱，來重新命名政策。
   + 您可以在 **Policy description** (政策描述) 輸入新文字，來變更描述。
   + 您可以在左側窗格中以 JSON 格式編輯政策，來編輯政策文字。或者，您可以在右側的編輯器中選擇陳述式，同時使用控制項來變更其元素。如需每個控制項的詳細資訊，請參閱本主題稍早的[建立 RCP 程序](orgs_policies_create.md#create-an-rcp)。

1. 完成時，請選擇**儲存變更**。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項命令來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "MyRenamedPolicy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/service_control_policy/p-i9j8k7l6m5",
              "Name": "MyRenamedPolicy",
              "Description": "Blocks all IAM actions",
              "Type": "SERVICE_CONTROL_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"Version\":\"2012-10-17\",		 	 	 \"Statement\":[{\"Sid\":\"Statement1\",\"Effect\":\"Deny\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
      }
  }
  ```

  下列範例會新增或變更資源控制政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --description "My new policy description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/service_control_policy/p-i9j8k7l6m5",
              "Name": "MyRenamedPolicy",
              "Description": "My new policy description",
              "Type": "SERVICE_CONTROL_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"Version\":\"2012-10-17\",		 	 	 \"Statement\":[{\"Sid\":\"Statement1\",\"Effect\":\"Deny\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
      }
  }
  ```

  下列範例透過指定包含新 JSON 政策文字的檔案來變更 RCP 的政策文件。

  ```
  $ aws organizations update-policy \
      --policy-id p-zlfw1r64 
      --content file://MyNewPolicyText.json
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/service_control_policy/p-i9j8k7l6m5",
              "Name": "MyRenamedPolicy",
              "Description": "My new policy description",
              "Type": "SERVICE_CONTROL_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"Version\":\"2012-10-17\",		 	 	 \"Statement\":[{\"Sid\":\"AModifiedPolicy\",\"Effect\":\"Deny\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
      }
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新宣告政策
<a name="update-declarative-policy-procedure"></a>

**最低許可**  
若要更新宣告式政策，您必須具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 Amazon 資源名稱 (ARN) 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新宣告政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在**[宣告政策](https://console.aws.amazon.com/organizations/v2/home/policies/declarative-policy-ec2)**頁面上，選擇您要更新的政策名稱。

1. 在政策的詳細資訊頁面上，選擇 **Edit policy** (編輯政策)。

1. 您可以輸入新的**政策名稱**、**策略說明**，或編輯 **JSON** 政策文字。如需宣告政策語法的詳細資訊，請參閱 [宣告政策語法和範例](orgs_manage_policies_declarative_syntax.md)。

1. 政策更新完成時，請選擇 **Save changes** (儲存變更)。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名宣告式政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "Renamed policy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/declarative_policy_ec2/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Type": "DECLARATIVE_POLICY_EC2",
              "AwsManaged": false
          },
          "Content": "{"ec2-configuration":{"ec2_attributes":{"image_block_public_access":{"state":{"@@assign":"block_new_sharing"}}}}".
      }
  }
  ```

  下列範例會新增或變更宣告政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --description "My new description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/declarative_policy_ec2/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Description": "My new description",
              "Type": "DECLARATIVE_POLICY_EC2",
              "AwsManaged": false
          },
          "Content": "{"ec2_attributes":{"image_block_public_access":{"state":{"@@assign":"block_new_sharing"}}}}".
      }
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新備份政策
<a name="update-backup-policy-procedure"></a>

登入組織的管理帳戶後，您可以在組織中編輯需要變更的政策。

**最低許可**  
若要更新備份政策，您必須具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在同一政策陳述式中指定 `Resource` 元素，其中包含要更新的政策 ARN (或「\$1」)
`organizations:DescribePolicy`，並在同一政策陳述式中指定 `Resource` 元素，其中包含要更新的政策 ARN (或「\$1」)

------
#### [ AWS 管理主控台 ]

**更新備份政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在 **[Backup policies](https://console.aws.amazon.com/organizations/v2/home/policies/backup-policy)** (備份政策) 頁面上，選擇您要更新的政策名稱。

1. 選擇 **Edit Policy** (編輯政策)。

1. 您可以輸入新的**政策名稱**、**政策描述**。您可以使用**視覺化編輯器**，或直接編輯 **JSON**，來變更政策內容。

1. 政策更新完成時，請選擇 **Save changes** (儲存變更)。

------
#### [ AWS CLI & AWS SDKs ]

**建立備份政策**  
您可以使用下列其中一項來備份政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名備份政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "Renamed policy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/backup_policy/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Type": "BACKUP_POLICY",
              "AwsManaged": false
          },
           "Content": "{\"plans\":{\"TestBackupPlan\":{\"regions\":{\"@@assign\":   ....TRUNCATED FOR BREVITY....   "@@assign\":[\"Yes\"]}}}}}}}"
      }
  }
  ```

  下列範例會新增或變更備份政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --description "My new description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/backup_policy/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Description": "My new description",
              "Type": "BACKUP_POLICY",
              "AwsManaged": false
          },
         "Content": "{\"plans\":{\"TestBackupPlan\":{\"regions\":{\"@@assign\":   ....TRUNCATED FOR BREVITY....   "@@assign\":[\"Yes\"]}}}}}}}"
      }
  }
  ```

  下列範例會變更連接至備份政策的 JSON 政策文件。在此範例中，內容擷取自名稱為 `policy.json` 的檔案，其中包含以下文字：

  ```
  {
      "plans": {
          "PII_Backup_Plan": {
              "regions": { "@@assign": [ "ap-northeast-2", "us-east-1", "eu-north-1" ] },
              "rules": {
                  "Hourly": {
                      "schedule_expression": { "@@assign": "cron(0 5/1 ? * * *)" },
                      "start_backup_window_minutes": { "@@assign": "480" },
                      "complete_backup_window_minutes": { "@@assign": "10080" },
                      "lifecycle": {
                          "move_to_cold_storage_after_days": { "@@assign": "180" },
                          "delete_after_days": { "@@assign": "270" },
                          "opt_in_to_archive_for_supported_resources": {"@@assign": false}
                      },
                      "target_backup_vault_name": { "@@assign": "FortKnox" },
                      "copy_actions": {
                          "arn:aws:backup:us-east-1:$account:backup-vault:secondary-vault": {
                              "lifecycle": {
                                  "move_to_cold_storage_after_days": { "@@assign": "10" },
                                  "delete_after_days": { "@@assign": "100" },
                                  "opt_in_to_archive_for_supported_resources": {"@@assign": false}
                              }
                          }
                      }
                  }
              },
              "selections": {
                  "tags": {
                      "datatype": {
                          "iam_role_arn": { "@@assign": "arn:aws:iam::$account:role/MyIamRole" },
                          "tag_key": { "@@assign": "dataType" },
                          "tag_value": { "@@assign": [ "PII" ] }
                      }
                  }
              }
          }
      }
  }
  ```

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --content file://policy.json
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/backup_policy/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Description": "My new description",
              "Type": "BACKUP_POLICY",
              "AwsManaged": false
          },
           "Content": "{\"plans\":{\"TestBackupPlan\":{\"regions\":{\"@@assign\":   ....TRUNCATED FOR BREVITY....   "@@assign\":[\"Yes\"]}}}}}}}"
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新標籤政策
<a name="update-tag-policy-procedure"></a>

**最低許可**  
若要更新標籤政策，您必須具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新標籤政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在 ****[Tag policies](https://console.aws.amazon.com/organizations/v2/home/policies/tag-policy)**** (標籤政策) 頁面上，選擇您要更新的標籤政策。

1. 選擇 **Edit Policy** (編輯政策)。

1. 您可以輸入新的**政策名稱**、**政策描述**。可以使用**視覺化編輯器**或直接編輯 **JSON**，來變更政策內容。

1. 標籤政策更新完成時，請選擇 **Save Changes (儲存變更)**。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名標籤政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "Renamed tag policy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/tag_policy/p-i9j8k7l6m5",
              "Name": "Renamed tag policy",
              "Type": "TAG_POLICY",
              "AwsManaged": false
          },
          "Content": "{\n\"tags\":{\n\"CostCenter\":{\n\"tag_key\":{\n\"@@assign\":\"CostCenter\"\n}\n}\n}\n}\n\n"
      }
  }
  ```

  下列範例會新增或變更標籤政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --description "My new tag policy description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/tag_policy/p-i9j8k7l6m5",
              "Name": "Renamed tag policy",
              "Description": "My new tag policy description",
              "Type": "TAG_POLICY",
              "AwsManaged": false
          },
         "Content": "{\n\"tags\":{\n\"CostCenter\":{\n\"tag_key\":{\n\"@@assign\":\"CostCenter\"\n}\n}\n}\n}\n\n"
      }
  }
  ```

  下列範例會變更連接至 AI 服務選擇退出政策的 JSON 政策文件。在此範例中，內容擷取自名稱為 `policy.json` 的檔案，其中包含以下文字：

  ```
  {
    "tags": {
      "Stage": {
        "tag_key": {
          "@@assign": "Stage"
        },
        "tag_value": {
          "@@assign": [
            "Production",
            "Test"
          ]
        }
      }
    }
  }
  ```

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --content file://policy.json
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/tag_policy/p-i9j8k7l6m5",
              "Name": "Renamed tag policy",
              "Description": "My new tag policy description",
              "Type": "TAG_POLICY",
              "AwsManaged": false
          },
           "Content": "{\"tags\":{\"Stage\":{\"tag_key\":{\"@@assign\":\"Stage\"},\"tag_value\":{\"@@assign\":[\"Production\",\"Test\"]},\"enforced_for\":{\"@@assign\":[\"ec2:instance\"]}}}}"
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新聊天應用程式政策
<a name="update-chatbot-policy-procedure"></a>

**最低許可**  
若要更新聊天應用程式政策，您必須具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新聊天應用程式政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在****[聊天機器人政策](https://console.aws.amazon.com/organizations/v2/home/policies/chatbot-policy)**頁面上**，選擇您要更新的聊天應用程式政策。

1. 選擇 **Edit Policy** (編輯政策)。

1. 您可以輸入新的**政策名稱**、**政策描述**。可以使用**視覺化編輯器**或直接編輯 **JSON**，來變更政策內容。

1. 標籤政策更新完成時，請選擇 **Save Changes (儲存變更)**。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名聊天應用程式政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "Renamed chat applications policy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/chatbot_policy/p-i9j8k7l6m5",
              "Name": "Renamed chat applications policy",
              "Type": "CHATBOT_POLICY",
              "AwsManaged": false
          },
          "Content": "{"chatbot":{"platforms":{"slack":{"client":{"@@assign":"enabled"},"workspaces":{"@@assign":["Slack-Workspace-Id"]},"default":{"supported_channel_types":{"@@assign":["private"]}}},"microsoft_teams":{"client":{"@@assign":"disabled"}}}}}"
      }
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新 AI 服務選擇退出政策
<a name="update-ai-opt-out-policy-procedure"></a>

**最低許可**  
若要更新 AI 服務選擇退出政策，您必須具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 Amazon 資源名稱 (ARN) 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新 AI 服務選擇退出政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在 **[AI services opt-out policies](https://console.aws.amazon.com/organizations/v2/home/policies/aiservices-opt-out-policy)** (AI 服務選擇退出政策) 頁面上，選擇您要更新的政策名稱。

1. 在政策的詳細資訊頁面上，選擇 **Edit policy** (編輯政策)。

1. 您可以輸入新的**政策名稱**、**策略說明**，或編輯 **JSON** 政策文字。如需 AI 服務選擇退出政策語法的相關資訊，請參閱[AI 服務選擇退出政策語法和範例](orgs_manage_policies_ai-opt-out_syntax.md)。例如，您可以用作起點的政策，請參閱[AI 服務選擇退出政策範例](orgs_manage_policies_ai-opt-out_syntax.md#ai-opt-out-policy-examples)。

1. 政策更新完成時，請選擇 **Save changes** (儲存變更)。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名 AI 服務選擇退出政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --name "Renamed policy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/aiservices_opt_out_policy/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Type": "AISERVICES_OPT_OUT_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"services\":{\"default\":{\"opt_out_policy\":   ....TRUNCATED FOR BREVITY...   :{\"@@assign\":\"optIn\"}}}}"
      }
  }
  ```

  下列範例會新增或變更 AI 服務選擇退出政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --description "My new description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/aiservices_opt_out_policy/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Description": "My new description",
              "Type": "AISERVICES_OPT_OUT_POLICY",
              "AwsManaged": false
          },
          "Content": "{\"services\":{\"default\":{\"opt_out_policy\":   ....TRUNCATED FOR BREVITY...   :{\"@@assign\":\"optIn\"}}}}"
      }
  }
  ```

  下列範例會變更連接至 AI 服務選擇退出政策的 JSON 政策文件。在此範例中，內容擷取自名稱為 `policy.json` 的檔案，其中包含以下文字：

  ```
  {
      "services": {
          "default": {
              "opt_out_policy": {
                  "@@assign": "optOut"
              }
          },
          "comprehend": {
              "opt_out_policy": {
                  "@@operators_allowed_for_child_policies": ["@@none"],
                  "@@assign": "optOut"
              }
          },
          "rekognition": {
              "opt_out_policy": {
                  "@@assign": "optIn"
              }
          }
      }
  }
  ```

  ```
  $ aws organizations update-policy \
      --policy-id p-i9j8k7l6m5 \
      --content file://policy.json
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-i9j8k7l6m5",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/aiservices_opt_out_policy/p-i9j8k7l6m5",
              "Name": "Renamed policy",
              "Description": "My new description",
              "Type": "AISERVICES_OPT_OUT_POLICY",
              "AwsManaged": false
          },
           "Content": "{\n\"services\": {\n\"default\": {\n\"   ....TRUNCATED FOR BREVITY....    ": \"optIn\"\n}\n}\n}\n}\n"}
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------

## 更新 Security Hub 政策
<a name="update-security-hub-policy-procedure"></a>

**最低許可**  
若要更新 Security Hub 政策，您必須具有執行下列動作的許可：  
`organizations:UpdatePolicy`，並在包含指定政策 (或 "\$1") 的 ARN 的相同政策陳述式中具有 `Resource` 元素
`organizations:DescribePolicy`，並在包含指定政策 (或 "\$1") 的 Amazon 資源名稱 (ARN) 的相同政策陳述式中具有 `Resource` 元素

------
#### [ AWS 管理主控台 ]

**更新 Security Hub 政策**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在 **[Security Hub 政策](https://console.aws.amazon.com/organizations/v2/home/policies/securityhub-policy)**頁面上，選擇您要更新的政策名稱。

1. 在政策的詳細資訊頁面上，選擇 **Edit policy** (編輯政策)。

1. 您可以輸入新的**政策名稱**、**策略說明**，或編輯 **JSON** 政策文字。如需 Security Hub 政策語法的相關資訊，請參閱 [Security Hub 政策語法和範例](orgs_manage_policies_security_hub_syntax.md)。例如，您可以用作起點的政策，請參閱[Security Hub 政策範例](orgs_manage_policies_security_hub_syntax.md#security-hub-policy-examples)。

1. 政策更新完成時，請選擇 **Save changes** (儲存變更)。

------
#### [ AWS CLI & AWS SDKs ]

**更新政策**  
您可以使用下列其中一項來更新政策：
+ AWS CLI: [update-policy](https://docs.aws.amazon.com/cli/latest/reference/organizations/update-policy.html)

  下列範例會重新命名 Security Hub 政策。

  ```
  $ aws organizations update-policy \
      --policy-id p-66ev7hgcvj \
      --name "Renamed policy"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-66ev7hgcvj",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/securityhub_policy/p-66ev7hgcvj",
              "Name": "Renamed policy",
              "Type": "SECURITYHUB_POLICY",
              "AwsManaged": false
          },
          "Content": "{\n  \"securityhub\": {\n    \"enable_in_regions\": {\n      \"@@assign\":[\n        \"ALL_SUPPORTED\"\n      ]\n    },\n    \"disable_in_regions\": {\n      \"@@assign\":[]\n    }\n  }\n}\n"
      }
  }
  ```

  下列範例會新增或變更 Security Hub 政策的描述。

  ```
  $ aws organizations update-policy \
      --policy-id p-66ev7hgcvj \
      --name "My new description"
  {
      "Policy": {
          "PolicySummary": {
              "Id": "p-66ev7hgcvj",
              "Arn": "arn:aws:organizations::123456789012:policy/o-aa111bb222/securityhub_policy/p-66ev7hgcvj",
              "Name": "My new description",
              "Type": "SECURITYHUB_POLICY",
              "AwsManaged": false
          },
          "Content": "{\n  \"securityhub\": {\n    \"enable_in_regions\": {\n      \"@@assign\":[\n        \"ALL_SUPPORTED\"\n      ]\n    },\n    \"disable_in_regions\": {\n      \"@@assign\":[]\n    }\n  }\n}\n"
      }
  }
  ```
+ AWS SDKs：[UpdatePolicy](https://docs.aws.amazon.com/organizations/latest/APIReference/API_UpdatePolicy.html)

------