

 Amazon Redshift 將不再支援從修補程式 198 開始建立新的 Python UDFs。現有 Python UDF 將繼續正常運作至 2026 年 6 月 30 日。如需詳細資訊，請參閱[部落格文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

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

# 工作群組和命名空間
<a name="serverless-workgroup-namespace"></a>

若要在 Amazon Redshift Serverless 中隔離工作負載並管理不同的資源，您可以建立命名空間和工作群組，並將儲存和運算資源分開管理。

命名空間是資料庫物件和使用者的集合。儲存體相關的命名空間會組合結構描述、資料表、使用者或 AWS Key Management Service 金鑰來加密資料。儲存屬性包括管理員使用者的資料庫名稱和密碼、許可以及加密與安全。群組到命名空間底下的其他資源包括資料共用、復原點和用量限制。您可以使用 Amazon Redshift Serverless 主控台 AWS Command Line Interface、 或特定資源的 Amazon Redshift Serverless APIs 來設定這些儲存屬性。

工作群組是運算資源的集合。運算相關的工作群組會將運算資源 (例如 RPU、VPC 子網路群組和安全群組) 群組在一起。工作群組的屬性包括網路和安全設定。群組到工作群組底下的其他資源包括存取和用量限制。您可以使用 Amazon Redshift Serverless 主控台 AWS Command Line Interface、 或 Amazon Redshift Serverless APIs 來設定這些運算屬性。

您可以建立一或多個命名空間與工作群組。每個命名空間只能有一個與其相關聯的工作群組。相反地，每個工作群組只能與一個命名空間相關聯。

## 使用主控台的工作群組和命名空間
<a name="serverless-workgroups-and-namespaces-console"></a>

設定 Amazon Redshift Serverless 需要逐步完成數個組態步驟。當您遵循步驟來設定 Amazon Redshift Serverless 時，您會建立命名空間和工作群組，並讓其彼此建立關聯。若要使用 Amazon Redshift Serverless 主控台開始設定 Amazon Redshift Serverless 組態，您可以選擇**開始使用 Amazon Redshift Serverless** 以設定 Amazon Redshift Serverless 並開始與其互動。您可以選擇具有預設設定的環境以加快設定速度，或根據組織的需求明確進行設定。在此過程中，您會指定工作群組和命名空間的設定。

在設定環境後，[工作群組屬性](serverless-console-workgroups.md#serverless-workgroup-describe)和[命名空間屬性](serverless-console-configure-namespace-working.md#serverless-console-namespace-config)可協助您熟悉設定。

## 使用 和 Amazon Redshift Serverless API 的工作群組 AWS Command Line Interface 和命名空間
<a name="serverless-workgroups-and-namespaces-cli"></a>

 除了使用 AWS 主控台之外，您也可以使用 AWS CLI 或 Amazon Redshift Serverless API 與工作群組和命名空間互動。下表列出可用來管理快照和復原點的 API 和 CLI 作業。


| API 操作 | CLI 命令 | Description | 
| --- | --- | --- | 
| [CreateNamespace](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_CreateNamespace.html) | 建立命名空間 | 建立命名空間。根據預設，Amazon Redshift Serverless 會使用預設 AWS Key Management Service 金鑰建立命名空間，但您可以指定另一個金鑰來加密資料。您也可以透過還原快照建立命名空間。如需詳細資訊，請參閱[使用快照和復原點](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html)。 | 
| [UpdateNamespace](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_UpdateNamespace.html) | 更新命名空間 | 更新命名空間。 | 
| [GetNamespace](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_GetNamespace.html) | 獲取命名空間 | 擷取命名空間的相關資訊。 | 
| [ListNamepaces](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_ListNamespaces.html) | 清單命名空間 | 擷取有關命名空間清單的資訊。 | 
| [DeleteNamespace](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_DeleteNamespace.html) | 刪除命名空間 | 刪除命名空間。 | 
| [CreateWorkgroup](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_CreateWorkgroup.html) | 建立工作群組 | 建立工作群組。建立工作群組時，請確定您具有可與工作群組關聯的現有命名空間。您可以在建立工作群組時指定任何運算資源，例如子網路、安全群組或 RPU。 | 
| [UpdateWorkgroup](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_UpdateWorkgroup.html) | 更新工作群組 | 更新工作群組。 | 
| [GetWorkgroup](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_GetWorkgroup.html) | 取得工作群組 | 擷取有關工作群組的資訊。 | 
| [ListWorkgroups](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_ListWorkgroups.html) | 工作群組清單 | 擷取有關工作群組清單的資訊。 | 
| [DeleteWorkgroup](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_DeleteWorkgroup.html) | 刪除工作群組 | 刪除工作群組。 | 