

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

# 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_tw/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 範例可讓 `insecureSkipVerification` 進行 REST API HTTP 代理整合。

```
"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 範例指定 `serverNameToVerify` 來進行 HTTP API 私有整合。

```
"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"
  }
}
```