---
schema_version: "1"
id: e6f75788f3002e5779f5e7031083b55db0dc0ffcfee1861e80b397c67e5c7509
title: Web-data-connector-settings 实体
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/server/entity_wdc.md
canonical_url: https://help.tableau.com/current/server/zh-cn/entity_wdc.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 1cc0c6285dfbfa0d56c1d573dce0a48330c30515fb5f70f765c84bd750b089cc
description: Reference for the web-data-connector-settings entity to manage WDC settings via JSON.
---
[跳转到主要内容](#main-content)

# Web-data-connector-settings 实体

此实体用于管理 Web 数据连接器 (WDC) 设置。若要了解有关在 Tableau Server 中使用 WDC 的详细信息，请参见 [Tableau Server 中的 Web 数据连接器](https://help.tableau.com/current/server/zh-cn/datasource_wdc.htm)和[tsm data-access](https://help.tableau.com/current/server/zh-cn/cli_data-access.htm)。

使用下面的配置文件模板创建一个 .json 文件。在使用适当的值填充选项后，请使用以下命令传递 .json 文件并应用设置：

`tsm settings import -f /path/to/file.json`

`tsm pending-changes apply`

如果待定更改需要重新启动服务器，`pending-changes apply` 命令将显示一个提示，告知您将进行重新启动。即使服务器已停止，此提示也会显示，但在这种情况下不会重新启动。您可以使用 `--ignore-prompt` 选项隐藏提示，但这样做不会改变重新启动行为。如果更改不需要重新启动，则会在不提示的情况下应用更改。有关详细信息，请参见[tsm pending-changes apply](https://help.tableau.com/current/server/zh-cn/cli_pending-changes.htm#pending-changes-apply)。

### Web 数据连接器设置

下面模板中的 Web 数据连接器 (WDC) 设置指定是否启用 WDC、是否启用 WDC 刷新，以及主安全列表和辅助安全列表。允许列表指明哪些 WDC URL 已获批准可在 Tableau Server 安装中使用，以及连接器可向其发送请求和从中接收请求的域或 URL。

### 配置模板

使用此模板配置 WDC 设置。

**重要信息：**所有实体选项均区分大小写。

有关配置文件、实体和密钥的更多说明，请参见[配置文件示例](https://help.tableau.com/current/server/zh-cn/config_file_example.htm)。

{
  "configEntities": {
    "web-data-connector-settings": {
      "\_type": "webDataConnectorSettingsType",
      "refreshEnabled": true,
      "whitelist": {
        "https://www.example.com:443/wdc/": {
          "secondaryWhitelist": \[
          "https://www.example.com/.\*",
          "https://www.coolapi.com/.\*"
          \]
        }
      },
      "enabled": true
    }
  }
}

{
  "configEntities": {
    "web-data-connector-settings": {
      "\_type": "webDataConnectorSettingsType",
      "refreshEnabled": true,
      "whitelist": {
        "https://www.example.com:443/wdc/": {
          "secondaryWhitelist": \[
          "https://www.example.com/.\*"
          \]
        },
        "https://www.mysite.com:443/coolwdc/": {
          "secondaryWhitelist": \[
          "https://www.mysite.com/.\*",
          "https://www.coolapi.com/.\*"
          \]
        }
      },
      "enabled": true
    }
  }
}

### 配置文件参考

此表包括可随 `web-data-connector-settings` 实体集一起包括的所有选项。

\_type

必需。

值：`webDataConnectorSettingsType`

请不要更改。

refreshEnabled

设置为 `false` 以禁用 WDC 刷新。默认为 `true`。

whitelist

必需。

可包含一个或多个匹配的安全列表和辅助安全列表集（每个 WDC 一个集）。提供的第一个 URL 是安全列表，您可以在其中指定 WDC URL 和端口，格式如下：

`<scheme>://<host>:<port>/<path>`

对于多个 WDC，`<port>` 值为 443（即 HTTPS 的默认端口），但您可以通过在 Tableau Server 或 Tableau Cloud 上查看数据源详细信息来检查适用于您的连接器的值。

secondaryWhitelist

必需。

指定连接器可向其发送请求和从中接收请求的域或 URL，例如 JavaScript 库、REST API 或本地文件。若要将整个域添加到辅助安全列表，您可以在 URL 结尾使用通配符表达式 `.*`，如下例所示：

`https://www.example.com/.*`  

enabled

设置为 `false` 以禁止使用 WDC。默认为 `true`。