从 AWS powershell 工具使用 UpdateCrawler 时出错更新爬虫

Error Update Crawler when using UpdateCrawler from AWS powershell tools

我试图从 powershell 脚本更新 Glue Crawler。但似乎 AWS 不喜欢这个名字,尽管爬虫名称是由 AWS Data Lake Formation!

创建的

我只想更新包含路径,没有其他爬虫,所以我假设下面的 JSON 请求没问题,知道为什么我收到错误吗?

    # Update Source Schema Discoverer Crawler.
    $crawlername = 'wf_db_snapshot_discoverer_286ef141'
    $includePath = "$($Config.DbName)/dbo/%"

$crawlerUpdateReq = @"
{
   "Name": "$crawlername",
   "Targets": { 
      "JdbcTargets": [ 
         { 
            "Path": "$includePath"
         }
      ]
   }
}
"@

$crawlerUpdateResp = Update-GLUECrawler $crawlerUpdateReq

日志

Updating Crawler...
1 validation error detected: Value '{
   "Name": "wf_db_snapshot_discoverer_286ef141",
   "Targets": {
      "JdbcTargets": [
         {
            "Path": "DB_029/dbo/%"
         }
      ]
   }
}' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*
1 validation error detected: Value '{
   "Name": "wf_db_snapshot_discoverer_286ef141",
   "Targets": {
      "JdbcTargets": [
         {
            "Path": "DB_029/dbo/%"
         }
      ]
   }
}' at 'name' failed to satisfy constraint: Member must satisfy regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*
The remote server returned an error: (400) Bad Request.
The remote server returned an error: (400) Bad Request.

正则表达式模式:[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]* 不允许您添加 new line 个字符。 JSON 在发送到 API 端点之前需要 缩小