小编ris*_*ail的帖子

当尝试使用 Terraform 创建 API 网关资源时,为什么我会得到 Resource's path part only allowed a-zA-Z0-9._-: ?

是否可以使用 Terraform 从根目录创建带有子目录的AWS API 网关资源?

做的时候

resource "aws_api_gateway_resource" "MyDemoResource" {
  rest_api_id = aws_api_gateway_rest_api.MyDemoAPI.id
  parent_id   = aws_api_gateway_rest_api.MyDemoAPI.root_resource_id
  path_part   = "/will/this/work"
}
Run Code Online (Sandbox Code Playgroud)

我收到错误:

aws_api_gateway_resource.MyDemoResource: 1 error occurred: aws_api_gateway_resource.MyDemoResource: Error creating API Gateway Resource: BadRequestException: Resource's path part only allow a-zA-Z0-9._-: or a valid greedy path variable and curly braces at the beginning and the end."
Run Code Online (Sandbox Code Playgroud)

我找到了这张GitHub 票证 和其他一些类似的票证。我不确定这是一个错误还是设计上有解决方法。

此外,如果我在 AWS 控制台中手动创建此路径然后导入它,则完整路径会path正确显示在属性中,但不会显示在输入中path_part

"aws_api_gateway_resource.MyDemoResource": {
                    "type": "aws_api_gateway_resource",
                    "depends_on": [],
                    "primary": {
                        "id": "foo",
                        "attributes": {
                            "id": "foo",
                            "parent_id": …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services terraform aws-api-gateway

8
推荐指数
1
解决办法
8458
查看次数

datadog API python 身份验证

是否有一个如何使用 python lib 向 datadog 进行身份验证的基本示例datadog_api_client.v2?我正在查看他们的文档https://datadoghq.dev/datadog-api-client-python/v2/#apikeyauth,但没有看到任何我期望的示例:

import datadog_api_client.v2
import os
from datadog_api_client.v2 import list_tag_configurations

configuration = datadog_api_client.v2.Configuration(
    host = "https://api.datadoghq.com"
)

configuration.api_key['apiKeyAuth'] = os.getenv('123')

with datadog_api_client.v2.ApiClient(configuration) as api_client:
    api_instance = list_tag_configurations(api_client)
    print(api_instance) 
Run Code Online (Sandbox Code Playgroud)

python datadog

7
推荐指数
1
解决办法
3393
查看次数

使用 Python 生成报告:PDF 或 HTML 到 PDF

使用maptplotlib我创建了 9 个图形,这些图形使用命令组合成一个 pdf savefig。但是,我需要能够使用.describe(). 什么是最好的方法来做到这一点?

python matplotlib pandas

5
推荐指数
1
解决办法
2万
查看次数

Thingsboard不是从Source构建的

我有一个新的ubuntu 16.04虚拟机,我正在尝试使用此文档贡献指南安装thingboard并且没有任何成功:

这是在机器上做了什么:

  1. sudo apt-get install default-jre default-jdk
  2. 出口 JAVA_HOME='/usr/lib/jvm/default-java'
  3. git clone https://github.com/thingsboard/thingsboard.git
  4. git checkout release-1.3
  5. cd ${TB_WORK_DIR}/application
  6. mvn clean install -DskipTests
  7. 修改cd ${TB_WORK_DIR}/application/target/bin/install/install_dev_db.sh为我的用户和执行脚本.
    我想暂时使用HSQLDB.
  8. cd ${TB_WORK_DIR}/application
  9. mvn clean install -DskipTests

结果:

NPM服务器启动,但当我登录localhost:3000并尝试使用tenant@thingsboard.org/ 登录时tenant,我收到错误

[Error API proxy error: Error connect ECONNREFUSED 127.0.0.1:8080]
Run Code Online (Sandbox Code Playgroud)

我已经三次检查我没有打字错误.

我错过了一步吗?

我没有使用代理并收到与上面相同的错误:

npm config set proxy null npm config set https-proxy null npm config npm config set registry http://registry.npmjs.org/

cat~/.npmrc:

proxy=null https-proxy=null registry=http://registry.npmjs.org/ls

maven npm thingsboard

5
推荐指数
1
解决办法
1089
查看次数

错误"无法对'System.Int32'和'System.String'执行类似操作"设置DataGridView数据源

我使用Visual Studio在Windows应用程序中创建了一个数据网格视图,我试图用搜索文本框查询它.该字段是一系列数字,但我已经设置好了Varchar(10).

当我使用下面的命令时,我收到以下错误

无法在'System.Int32'和'System.String'上执行Like操作

码:

DataView DV = new DataView(dbdataset);
DV.RowFilter = string.Format("JobNumber Like '%{0}%' ", textBox1.Text);
dataGridView1.DataSource = DV;
Run Code Online (Sandbox Code Playgroud)

谢谢

c# sql visual-studio-2010 winforms

2
推荐指数
1
解决办法
6907
查看次数

查找并删除单元格值为“#N/A”的行

我有一个 excel 文档,我用它来分析数据集,我引入的每个数据资产都有不同数量的数据。我试图编写一个分配给按钮的宏,该按钮可以根据单元格的值识别删除行。这是行不通的。我究竟做错了什么?

Sub Button2_Click()
[vb]
'This will find how many rows there are
 With ActiveSheet
    lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
    MsgBox lastRow
 End With

 Sub sbDelete_Rows_Based_On_Criteria()
     Dim lRow As Long
     Dim iCntr As Long
     lRow = lastRow
     For iCntr = lRow To 1 Step -1
         'Replaces XX with the variable you want to delete
         If Cells(iCntr, 1) = "#N/A" Then
             Rows(iCntr).Delete
         End If
     Next
 End Sub
 [/vb]
End Sub
Run Code Online (Sandbox Code Playgroud)

excel vba find delete-row

1
推荐指数
1
解决办法
1万
查看次数