

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

# Amazon Keyspaces 的服務端點
<a name="programmatic.endpoints"></a>

**Topics**
+ [連接埠和通訊協定](#ports)
+ [全域端點](#global_endpoints)
+ [AWS GovCloud (US) Region FIPS 端點](#fips_endpoints)
+ [中國區域端點](#china_endpoints)
+ [串流端點](#streams_endpoints)
+ [連線至雙堆疊端點](dualstack_endpoints.md)

## 連接埠和通訊協定
<a name="ports"></a>

您可以使用 Apache 2.0 授權的 Cassandra 驅動程式`cqlsh`，或使用 AWS CLI 和 AWS SDK，以程式設計方式存取 Amazon Keyspaces。

下表顯示不同存取機制的連接埠和通訊協定。


| 程式設計存取 | 站點 | 通訊協定 | 
| --- | --- | --- | 
| CQLSH | 9142 | TLS | 
| Cassandra 驅動程式 | 9142 | TLS | 
| AWS CLI | 443 | HTTPS | 
| AWS 開發套件 | 443 | HTTPS | 

 對於 TLS 連線，Amazon Keyspaces 會使用 Amazon Trust Services (Amazon Root CAs1–4) 發行的憑證來驗證伺服器。如需詳細資訊，請參閱 [如何手動設定 TLS 的`cqlsh`連線](programmatic.cqlsh.md#encrypt_using_tls)或 [使用 Cassandra 用戶端驅動程式以程式設計方式存取 Amazon Keyspaces](programmatic.drivers.md) 章節中的驅動程式[開始之前](using_java_driver.md#using_java_driver.BeforeYouBegin)一節。

## 全域端點
<a name="global_endpoints"></a>

 Amazon Keyspaces 同時支援 IPv4 和 IPv6 公有端點。您可以選擇 IPv4 端點和雙堆疊端點。端點使用以下命名慣例，您可以在其中將 *us-east-1* 取代為資料表 AWS 區域 中可用的另一個。
+ **IPv4 端點** – `cassandra.us-east-1.amazonaws.com`
+ **雙堆疊端點** – `cassandra.us-east-1.api.aws`

如需雙堆疊端點以及如何設定連線的詳細資訊，請參閱 [連線至雙堆疊端點](dualstack_endpoints.md)。

Amazon Keyspaces 可在下列區域使用。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/programmatic.endpoints.html)

## AWS GovCloud (US) Region FIPS 端點
<a name="fips_endpoints"></a>

中的可用 FIPS 端點 AWS GovCloud (US) Region。Amazon Keyspaces 同時支援 IPv4 和 IPv6 FIPS 端點。您可以選擇 IPv4 端點和雙堆疊端點。如需詳細資訊，請參閱《 [*AWS GovCloud (US) 使用者指南*》中的 Amazon Keyspaces](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-keyspaces.html)。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/programmatic.endpoints.html)

## 中國區域端點
<a name="china_endpoints"></a>

Amazon Keyspaces 在中國 AWS 區域支援 IPv4 端點。

若要存取這些端點，您必須註冊一組中國區域獨有的個別帳戶登入資料。如需詳細資訊，請參閱[中國註冊、帳戶和登入資料](https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html)。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/programmatic.endpoints.html)

## 串流端點
<a name="streams_endpoints"></a>

Amazon Keyspaces CDC streams 在以下提供 AWS 區域。此資料表顯示每個區域的可用雙堆疊服務端點。如需 的詳細資訊 Amazon Keyspaces CDC streams，請參閱 [如何在 Amazon Keyspaces 中存取 CDC 串流端點](CDC_access-endpoints.md)。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/programmatic.endpoints.html)

# 連線至雙堆疊端點
<a name="dualstack_endpoints"></a>

Amazon Keyspaces 全域端點是接受 IPv4 和 IPv6 請求的雙堆疊端點。

使用 IPv6 連線至 Amazon Keyspaces 時，服務會自動調整系統資料表回應，以符合您的連線通訊協定。這可確保您的應用程式接收與其連線類型相符的一致網路地址資訊。這可為用戶端提供準確的網路拓撲資訊，同時保持現有 CQL 應用程式的回溯相容性。

Amazon Keyspaces 會自動偵測用戶端連線所使用的網路通訊協定 (IPv4 或 IPv6)，並相應地調整系統資料表回應。此偵測會在初始連線交握期間透明發生，不需要用戶端應用程式的額外組態。

Amazon Keyspaces 會根據您的連線通訊協定傳回 IP 地址。例如，來自 IPv4 網路的請求會傳回下列回應。

```
SELECT * FROM system.peers;
-- Returns IPv4 addresses in peer column
-- Example: 172.31.1.1, 172.31.1.2, etc.
```

從 IPv6 網路到雙堆疊端點的連線，例如 `cassandra.us-east-1.api.aws`，會傳回下列回應。

```
SELECT * FROM system.peers;
-- Returns IPv6 addresses in peer column
-- Example: 2001:db8::1, 2001:db8::2, etc.
```

如需 Amazon Keyspaces 中 IPv6 支援的詳細資訊，請參閱 [Amazon Keyspaces 中的 IPv6 支援](ipv6-support.md)。