

# x-amazon-apigateway-integration.tlsConfig object
<a name="api-gateway-extensions-integration-tls-config"></a>

指定集成的 TLS 配置。


| 属性名称 | 类型 | 说明 | 
| --- | --- | --- | 
| insecureSkipVerification | Boolean |  仅支持用于 REST API 。指定 API Gateway 是否跳过集成端点的证书由[受支持的证书颁发机构](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-supported-certificate-authorities-for-http-endpoints.html)颁发的验证。建议不要这样做，但它使您能够使用由私有证书颁发机构签名的证书或自签名的证书。如果启用，API Gateway 仍会执行基本证书验证，其中包括检查证书的到期日期、主机名以及是否存在根证书颁发机构。属于私有颁发机构的根证书必须满足以下限制： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/apigateway/latest/developerguide/api-gateway-extensions-integration-tls-config.html)  仅支持用于 `HTTP` 和 `HTTP_PROXY` 集成。  不推荐启用 `insecureSkipVerification`，特别是用于与公共 HTTPS 端点的集成。如果您启用 `insecureSkipVerification`，将增加中间人攻击的风险。   | 
| serverNameToVerify | string |  仅支持用于 HTTP API 私有集成。如果指定服务器名称，API Gateway 将使用它来验证集成证书上的主机名。TLS 握手中也包含服务器名称，以支持服务器名称指示 (SNI) 或虚拟主机。  | 

## x-amazon-apigateway-integration.tlsConfig examples
<a name="api-gateway-extensions-integration-tls-config-example"></a>

下面的 OpenAPI 3.0 示例为 REST API HTTP 代理集成启用 `insecureSkipVerification`。

```
"x-amazon-apigateway-integration": {
  "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets",
  "responses": {
     default": {
       "statusCode": "200"
      }
  },
  "passthroughBehavior": "when_no_match",
  "httpMethod": "ANY",
  "tlsConfig" : {
    "insecureSkipVerification" : true
  }
  "type": "http_proxy",
}
```

下面的 OpenAPI 3.0 示例为 HTTP API 私有集成指定 `serverNameToVerify`。

```
"x-amazon-apigateway-integration" : {
  "payloadFormatVersion" : "1.0",
  "connectionId" : "abc123",
  "type" : "http_proxy",
  "httpMethod" : "ANY",
  "uri" : "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/0467ef3c8400ae65",
  "connectionType" : "VPC_LINK",
  "tlsConfig" : {
     "serverNameToVerify" : "example.com"
  }
}
```