

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 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="connecting-connection-CNAME-describe-api"></a>

使用此部分中的命令，获取与特定预置集群或 Amazon Redshift Serverless 工作组关联的自定义域名列表。

您需要以下权限：
+ 对于预置集群：`redshift:DescribeCustomDomainAssociations`
+ 对于 Amazon Redshift Serverless 工作组：`redshiftServerless:ListCnameAssociations`

作为最佳实践，我们建议将权限策略附加到 IAM 角色，然后根据需要将其分配给用户和组。有关更多信息，请参阅 [Amazon Redshift 中的 Identity and Access Management](https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-authentication-access-control.html)。

以下显示的示例命令用于列出给定 Amazon Redshift 集群的自定义域名：

```
aws redshift describe-custom-domain-associations ––custom-domain-name {{customdomainname}}
```

启用自定义域名后，您可以运行此命令来确定与集群关联的自定义域名。有关用于描述自定义域关联的 CLI 命令的更多信息，请参阅 [describe-custom-domain-associations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-custom-domain-associations.html)。

与此类似，以下显示的示例命令用于列出给定 Amazon Redshift Serverless 工作组的自定义域名：有一些不同的方法可以做到这一点。您可以只提供自定义域名：

```
aws redshift-serverless list-custom-domain-associations ––custom-domain-name {{customdomainname}}
```

您也可以通过只提供证书 ARN 来获取关联：

```
aws redshift-serverless list-custom-domain-associations ––custom-domain-certificate-arn {{certificatearn}}
```

启用自定义域名后，您可以运行这些命令来确定与工作组关联的自定义域名。您也可以运行命令来获取自定义域关联的属性。为此，您必须将自定义域名和工作组名称作为参数提供。该命令返回证书 ARN、工作组名称和自定义域的证书到期时间：

```
aws redshift-serverless get-custom-domain-association ––workgroup-name {{workgroupname}} ––custom-domain-name {{customdomainname}}
```

有关可用于 Amazon Redshift Serverless 的 CLI 参考命令更多信息，请参阅 [redshift-serverless](https://docs.aws.amazon.com/cli/latest/reference/redshift-serverless/)。