

# 目录对象 API
<a name="aws-glue-api-catalog"></a>

目录对象 API 描述了与使用 AWS Glue 中的目录相关的数据类型和 API。

**Topics**
+ [目录 API](aws-glue-api-catalog-catalogs.md)
+ [数据库 API](aws-glue-api-catalog-databases.md)
+ [表 API](aws-glue-api-catalog-tables.md)
+ [分区 API](aws-glue-api-catalog-partitions.md)
+ [连接 API](aws-glue-api-catalog-connections.md)
+ [用户定义的函数 API](aws-glue-api-catalog-functions.md)
+ [将 Athena 目录导入 AWS Glue](aws-glue-api-catalog-migration.md)

# 目录 API
<a name="aws-glue-api-catalog-catalogs"></a>

目录 API 描述了用于创建、删除、查找、更新和列出目录的 API。

## 数据类型
<a name="aws-glue-api-catalog-catalogs-objects"></a>
+ [目录结构](#aws-glue-api-catalog-catalogs-Catalog)
+ [CatalogInput 结构](#aws-glue-api-catalog-catalogs-CatalogInput)
+ [TargetRedshiftCatalog 结构](#aws-glue-api-catalog-catalogs-TargetRedshiftCatalog)
+ [CatalogProperties 结构](#aws-glue-api-catalog-catalogs-CatalogProperties)
+ [CatalogPropertiesOutput 结构](#aws-glue-api-catalog-catalogs-CatalogPropertiesOutput)
+ [DataLakeAccessProperties 结构](#aws-glue-api-catalog-catalogs-DataLakeAccessProperties)
+ [IcebergOptimizationProperties 结构](#aws-glue-api-catalog-catalogs-IcebergOptimizationProperties)
+ [DataLakeAccessPropertiesOutput 结构](#aws-glue-api-catalog-catalogs-DataLakeAccessPropertiesOutput)
+ [IcebergOptimizationPropertiesOutput 结构](#aws-glue-api-catalog-catalogs-IcebergOptimizationPropertiesOutput)
+ [FederatedCatalog 结构](#aws-glue-api-catalog-catalogs-FederatedCatalog)

## 目录结构
<a name="aws-glue-api-catalog-catalogs-Catalog"></a>

目录对象表示 AWS Glue Data Catalog 或联合源中的数据库的逻辑分组。您现在可以创建 Redshift 联合目录，也可以创建包含指向另一个账户或区域中的 Redshift 数据库的资源链接的目录。

**Fields**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目录的 ID。要授予对默认目录的访问权限，不应提供此字段。
+ `Name`：*必需：*UTF-8 字符串，长度不少于 1 个字节，不超过 64 个字节，与 [Custom string pattern #25](aws-glue-api-common.md#regex_25) 匹配。

  目录的名称。不能与账户 ID 相同。
+ `ResourceArn` – UTF-8 字符串。

  分配给目录资源的 Amazon 资源名称 (ARN)。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  描述字符串，长度不超过 2048 个字节，与 URI 地址多行字符串模式匹配。目录的描述。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

   定义目录的参数和属性的键值对的映射数组。
+ `CreateTime` – 时间戳。

  创建目录的时间。
+ `UpdateTime` – 时间戳。

  上次更新目录的时间。
+ `TargetRedshiftCatalog` – 一个 [TargetRedshiftCatalog](#aws-glue-api-catalog-catalogs-TargetRedshiftCatalog) 对象。

  描述数据库资源链接的目标目录的 `TargetRedshiftCatalog` 对象。
+ `FederatedCatalog` – 一个 [FederatedCatalog](#aws-glue-api-catalog-catalogs-FederatedCatalog) 对象。

  指向 AWS Glue Data Catalog 外部某个实体的 `FederatedCatalog` 对象。
+ `CatalogProperties` – 一个 [CatalogPropertiesOutput](#aws-glue-api-catalog-catalogs-CatalogPropertiesOutput) 对象。

  指定数据湖访问属性和其他自定义属性的 `CatalogProperties` 对象。
+ `CreateTableDefaultPermissions` – [PrincipalPermissions](aws-glue-api-catalog-databases.md#aws-glue-api-catalog-databases-PrincipalPermissions) 对象的数组。

  `PrincipalPermissions` 数据元数组。在表上为主体创建一组默认权限。由 AWS Lake Formation 使用。正常的 AWS Glue 操作过程中不使用。
+ `CreateDatabaseDefaultPermissions` – [PrincipalPermissions](aws-glue-api-catalog-databases.md#aws-glue-api-catalog-databases-PrincipalPermissions) 对象的数组。

  `PrincipalPermissions` 数据元数组。在数据库上为主体创建一组默认权限。由 AWS Lake Formation 使用。正常的 AWS Glue 操作过程中不使用。
+ `AllowFullTableExternalDataAccess` – UTF-8 字符串（有效值：`True` \$1`False` ）。

   允许第三方引擎访问已在 Lake Formation 中注册的 Amazon S3 位置处的数据。

## CatalogInput 结构
<a name="aws-glue-api-catalog-catalogs-CatalogInput"></a>

描述目录属性的结构。

**Fields**
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  描述字符串，长度不超过 2048 个字节，与 URI 地址多行字符串模式匹配。目录的描述。
+ `FederatedCatalog` – 一个 [FederatedCatalog](#aws-glue-api-catalog-catalogs-FederatedCatalog) 对象。

  一个 `FederatedCatalog` 对象。引用 AWS Glue Data Catalog 外部某个实体（例如 Redshift 数据库）的 `FederatedCatalog` 结构。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  定义目录的参数和属性的键值对的映射数组。
+ `TargetRedshiftCatalog` – 一个 [TargetRedshiftCatalog](#aws-glue-api-catalog-catalogs-TargetRedshiftCatalog) 对象。

  描述资源链接的目标目录的 `TargetRedshiftCatalog` 对象。
+ `CatalogProperties` – 一个 [CatalogProperties](#aws-glue-api-catalog-catalogs-CatalogProperties) 对象。

  指定数据湖访问属性和其他自定义属性的 `CatalogProperties` 对象。
+ `CreateTableDefaultPermissions` – [PrincipalPermissions](aws-glue-api-catalog-databases.md#aws-glue-api-catalog-databases-PrincipalPermissions) 对象的数组。

  `PrincipalPermissions` 数据元数组。在表上为主体创建一组默认权限。由 AWS Lake Formation 使用。通常应明确设置为空列表。
+ `CreateDatabaseDefaultPermissions` – [PrincipalPermissions](aws-glue-api-catalog-databases.md#aws-glue-api-catalog-databases-PrincipalPermissions) 对象的数组。

  `PrincipalPermissions` 数据元数组。在数据库上为主体创建一组默认权限。由 AWS Lake Formation 使用。通常应明确设置为空列表。
+ `AllowFullTableExternalDataAccess` – UTF-8 字符串（有效值：`True` \$1`False` ）。

   允许第三方引擎访问已在 Lake Formation 中注册的 Amazon S3 位置处的数据。

## TargetRedshiftCatalog 结构
<a name="aws-glue-api-catalog-catalogs-TargetRedshiftCatalog"></a>

描述用于资源链接的目标目录的结构。

**Fields**
+ `CatalogArn` – *必填：*UTF-8 字符串。

  目录资源的 Amazon 资源名称 (ARN)。

## CatalogProperties 结构
<a name="aws-glue-api-catalog-catalogs-CatalogProperties"></a>

指定数据湖访问属性和其他自定义属性的结构。

**Fields**
+ `DataLakeAccessProperties` – 一个 [DataLakeAccessProperties](#aws-glue-api-catalog-catalogs-DataLakeAccessProperties) 对象。

  `DataLakeAccessProperties` 对象，指定用于为 AWS Glue Data Catalog 中的目录资源配置数据湖访问的属性。
+ `IcebergOptimizationProperties` – 一个 [IcebergOptimizationProperties](#aws-glue-api-catalog-catalogs-IcebergOptimizationProperties) 对象。

  一种结构，可为目录指定 Iceberg 表优化属性。这包括可应用于该目录中 Iceberg 表的压缩、保留和孤立文件删除操作的配置。
+ `CustomProperties` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  目录的其他键值属性，例如列统计数据优化。

## CatalogPropertiesOutput 结构
<a name="aws-glue-api-catalog-catalogs-CatalogPropertiesOutput"></a>

包括目录资源的配置属性的属性特性。

**Fields**
+ `DataLakeAccessProperties` – 一个 [DataLakeAccessPropertiesOutput](#aws-glue-api-catalog-catalogs-DataLakeAccessPropertiesOutput) 对象。

  具有输入属性的 `DataLakeAccessProperties` 对象，用于为 AWS Glue Data Catalog 中的目录资源配置数据湖访问。
+ `IcebergOptimizationProperties` – 一个 [IcebergOptimizationPropertiesOutput](#aws-glue-api-catalog-catalogs-IcebergOptimizationPropertiesOutput) 对象。

  一个 `IcebergOptimizationPropertiesOutput` 对象，可为目录指定 Iceberg 表优化设置，包括压缩、保留和孤立文件删除操作的配置。
+ `CustomProperties` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  目录的其他键值属性，例如列统计数据优化。

## DataLakeAccessProperties 结构
<a name="aws-glue-api-catalog-catalogs-DataLakeAccessProperties"></a>

用于为 AWS Glue Data Catalog 中的目录资源配置数据湖访问的输入属性。

**Fields**
+ `DataLakeAccess` – 布尔值。

  为从任何非 Redshift 引擎（例如 Amazon Athena、Amazon EMR 或 AWS Glue ETL）访问 Data Catalog 中的 Amazon Redshift 数据库的 Apache Spark 应用程序开启或关闭数据湖访问。
+ `DataTransferRole` – UTF-8 字符串，与 [Custom string pattern #53](aws-glue-api-common.md#regex_53) 匹配。

  AWS Glue 将代入的、在查询期间将数据传输到暂存存储桶/从暂存存储桶传输出的角色。
+ `KmsKey` – UTF-8 字符串。

  将用于与目录一起创建的暂存存储桶的加密密钥。
+ `CatalogType` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  为本机目录资源指定联合目录类型。目前支持的类型是 `aws:redshift`。

## IcebergOptimizationProperties 结构
<a name="aws-glue-api-catalog-catalogs-IcebergOptimizationProperties"></a>

一种结构，可为目录指定 Iceberg 表优化属性，包括压缩、保留和孤立文件删除操作的配置。

**Fields**
+ `RoleArn` – UTF-8 字符串，与 [Custom string pattern #53](aws-glue-api-common.md#regex_53) 匹配。

  将代入以执行 Iceberg 表优化操作的 IAM 角色的 Amazon 资源名称（ARN）。
+ `Compaction` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  键值对映射，可为 Iceberg 表压缩操作指定配置参数，这些操作可优化数据文件的布局以提高查询性能。
+ `Retention` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  键值对映射，可为 Iceberg 表保留操作指定配置参数，这些操作可管理表快照的生命周期以控制存储成本。
+ `OrphanFileDeletion` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  键值对映射，可为 Iceberg 孤立文件删除操作指定配置参数，这些操作可识别和删除表元数据不再引用的文件。

## DataLakeAccessPropertiesOutput 结构
<a name="aws-glue-api-catalog-catalogs-DataLakeAccessPropertiesOutput"></a>

用于为 AWS Glue Data Catalog 中的目录资源配置数据湖访问的输出属性。

**Fields**
+ `DataLakeAccess` – 布尔值。

  为访问 Data Catalog 中的 Amazon Redshift 数据库的 Apache Spark 应用程序开启或关闭数据湖访问。
+ `DataTransferRole` – UTF-8 字符串，与 [Custom string pattern #53](aws-glue-api-common.md#regex_53) 匹配。

  AWS Glue 将代入的、在查询期间将数据传输到暂存存储桶/从暂存存储桶传输出的角色。
+ `KmsKey` – UTF-8 字符串。

  将用于与目录一起创建的暂存存储桶的加密密钥。
+ `ManagedWorkgroupName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  为您的目录资源创建的托管 Redshift Serverless 计算名称。
+ `ManagedWorkgroupStatus` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  托管 Redshift Serverless 计算状态。
+ `RedshiftDatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  托管计算中的默认 Redshift 数据库资源名称。
+ `StatusMessage` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  该消息提供有关托管工作组状态的更多详细信息。
+ `CatalogType` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  为本机目录资源指定联合目录类型。目前支持的类型是 `aws:redshift`。

## IcebergOptimizationPropertiesOutput 结构
<a name="aws-glue-api-catalog-catalogs-IcebergOptimizationPropertiesOutput"></a>

一种结构，其中包含用于 AWS Glue Data Catalog 中目录资源的 Iceberg 表优化配置的输出属性。

**Fields**
+ `RoleArn` – UTF-8 字符串，与 [Custom string pattern #53](aws-glue-api-common.md#regex_53) 匹配。

  用于执行 Iceberg 表优化操作的 IAM 角色的 Amazon 资源名称（ARN）。
+ `Compaction` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  键值对映射，可为 Iceberg 表压缩操作指定配置参数，这些操作可优化数据文件的布局以提高查询性能。
+ `Retention` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  键值对映射，可为 Iceberg 表保留操作指定配置参数，这些操作可管理表快照的生命周期以控制存储成本。
+ `OrphanFileDeletion` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  键值对映射，可为 Iceberg 孤立文件删除操作指定配置参数，这些操作可识别和删除表元数据不再引用的文件。
+ `LastUpdatedTime` – 时间戳。

  上次更新 Iceberg 优化属性时的时间戳。

## FederatedCatalog 结构
<a name="aws-glue-api-catalog-catalogs-FederatedCatalog"></a>

指向 AWS Glue Data Catalog 外部某个实体的目录。

**Fields**
+ `Identifier` – UTF-8 字符串，长度不少于 1 个字节或超过 512 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  联合目录的唯一标识符。
+ `ConnectionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  与外部数据来源的连接的名称，例如 Redshift 联合目录。
+ `ConnectionType` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于访问联合目录的连接类型，指定连接外部数据来源的协议或方法。

## 操作
<a name="aws-glue-api-catalog-catalogs-actions"></a>
+ [CreateCatalog 操作（Python：create\$1catalog）](#aws-glue-api-catalog-catalogs-CreateCatalog)
+ [UpdateCatalog 操作（Python：update\$1catalog）](#aws-glue-api-catalog-catalogs-UpdateCatalog)
+ [DeleteCatalog 操作（Python：delete\$1catalog）](#aws-glue-api-catalog-catalogs-DeleteCatalog)
+ [GetCatalog 操作（Python：get\$1catalog）](#aws-glue-api-catalog-catalogs-GetCatalog)
+ [GetCatalogs 操作（Python：get\$1catalogs）](#aws-glue-api-catalog-catalogs-GetCatalogs)

## CreateCatalog 操作（Python：create\$1catalog）
<a name="aws-glue-api-catalog-catalogs-CreateCatalog"></a>

在 AWS Glue Data Catalog 中创建新目录。

**请求**
+ `Name`：*必需：*UTF-8 字符串，长度不少于 1 个字节，不超过 64 个字节，与 [Custom string pattern #25](aws-glue-api-common.md#regex_25) 匹配。

  要创建的目录的名称。
+ `CatalogInput` – *必填：*一个 [CatalogInput](#aws-glue-api-catalog-catalogs-CatalogInput) 对象。

  定义目录的元数据的 `CatalogInput` 对象。
+ `Tags` – 键值对的映射数组，不超过 50 对。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值是一个 UTF-8 字符串，不超过 256 个字节。

  键值对的映射数组，不超过 50 对。每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。每个值是一个 UTF-8 字符串，不超过 256 个字节。您分配给目录的标签。

**响应**
+ *无响应参数。*

**错误**
+ `InvalidInputException`
+ `AlreadyExistsException`
+ `ResourceNumberLimitExceededException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ConcurrentModificationException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `FederatedResourceAlreadyExistsException`
+ `FederationSourceException`

## UpdateCatalog 操作（Python：update\$1catalog）
<a name="aws-glue-api-catalog-catalogs-UpdateCatalog"></a>

更新 AWS Glue Data Catalog 中现有目录的属性。

**请求**
+ `CatalogId` –*必填项：*目录 id 字符串，长度不少于 1 个字节，并且不超过 255 个字节，并且符合 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine)。

  目录的 ID。
+ `CatalogInput` – *必填：*一个 [CatalogInput](#aws-glue-api-catalog-catalogs-CatalogInput) 对象。

  指定现有目录的新属性的 `CatalogInput` 对象。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ConcurrentModificationException`
+ `AccessDeniedException`
+ `FederationSourceException`

## DeleteCatalog 操作（Python：delete\$1catalog）
<a name="aws-glue-api-catalog-catalogs-DeleteCatalog"></a>

从 AWS Glue Data Catalog 中移除指定的目录。

完成此操作后，您将无法再访问已删除目录中的数据库、表（以及可能属于表的所有表版本和分区）和用户定义的函数。AWS Glue 会及时以异步方式删除这些“孤立”资源，这由服务决定。

为了确保在调用 `DeleteCatalog` 操作之前立即删除所有相关资源，请使用 `DeleteTableVersion`（或 `BatchDeleteTableVersion`）、`DeletePartition`（或 `BatchDeletePartition`）、`DeleteTable`（或 `BatchDeleteTable`）、`DeleteUserDefinedFunction` 和 `DeleteDatabase` 删除属于该目录的任何资源。

**请求**
+ `CatalogId` –*必填项：*目录 id 字符串，长度不少于 1 个字节，并且不超过 255 个字节，并且符合 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine)。

  目录的 ID。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ConcurrentModificationException`
+ `AccessDeniedException`
+ `FederationSourceException`

## GetCatalog 操作（Python：get\$1catalog）
<a name="aws-glue-api-catalog-catalogs-GetCatalog"></a>

要检索的目录的名称。应当全部小写。

**请求**
+ `CatalogId` –*必填项：*目录 id 字符串，长度不少于 1 个字节，并且不超过 255 个字节，并且符合 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine)。

  目录所在父目录的 ID。如果没有提供，则默认情况下使用 AWS 账号。

**响应**
+ `Catalog` – 一个 [目录](#aws-glue-api-catalog-catalogs-Catalog) 对象。

  一个 `Catalog` 对象。AWS Glue Data Catalog 中指定目录的定义。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## GetCatalogs 操作（Python：get\$1catalogs）
<a name="aws-glue-api-catalog-catalogs-GetCatalogs"></a>

检索 AWS Glue Data Catalog 中某个目录中定义的所有目录。对于 Redshift 联合目录使用场景，此操作返回映射到 Redshift 命名空间目录中的 Redshift 数据库的目录列表。

**请求**
+ `ParentCatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目录所在父目录的 ID。如果没有提供，则默认情况下使用 AWS 账号。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。
+ `MaxResults` – 数字（整数），不小于 1 或大于 1000。

  要在一个响应中返回的目录的最大数量。
+ `Recursive` – 布尔值。

  是否列出目录层次结构中的所有目录，从 `ParentCatalogId` 开始。默认值为 `false`。当为 `true` 时，`ParentCatalogID` 层次结构中的所有目录对象都将在响应中枚举。
+ `IncludeRoot` – 布尔值。

  是否在响应中列出账户和区域中的默认目录。默认值为 `false`。当为 `true` 和 `ParentCatalogId = NULL | AWS Account ID` 时，所有目录和默认目录都将在响应中枚举。

  如果 `ParentCatalogId` 不等于 null，并且此属性作为 `false` 或 `true` 进行传递，则会引发 `InvalidInputException`。

**响应**
+ `CatalogList` – *必填：*[目录](#aws-glue-api-catalog-catalogs-Catalog) 对象的数组。

  `Catalog` 数据元数组。指定父目录中的 `Catalog` 对象的列表。
+ `NextToken` – UTF-8 字符串。

  对返回的标记列表进行分页的延续令牌 (如果列表的当前片段不是最后一个，则返回)。

**错误**
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

# 数据库 API
<a name="aws-glue-api-catalog-databases"></a>

数据库 API 介绍数据库数据类型，还包括用于创建、删除、定位、更新和列出数据库的 API。

## 数据类型
<a name="aws-glue-api-catalog-databases-objects"></a>
+ [Database 结构](#aws-glue-api-catalog-databases-Database)
+ [DatabaseInput 结构](#aws-glue-api-catalog-databases-DatabaseInput)
+ [PrincipalPermissions 结构](#aws-glue-api-catalog-databases-PrincipalPermissions)
+ [DataLakePrincipal 结构](#aws-glue-api-catalog-databases-DataLakePrincipal)
+ [DatabaseIdentifier 结构](#aws-glue-api-catalog-databases-DatabaseIdentifier)
+ [联合数据库结构](#aws-glue-api-catalog-databases-FederatedDatabase)

## Database 结构
<a name="aws-glue-api-catalog-databases-Database"></a>

`Database` 对象表示可能驻留在 Hive 元存储或 RDBMS 中的表的逻辑分组。

**字段**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  数据库的名称。为了确保 Hive 兼容性，它在存储时被转换为小写。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  对数据库的描述。
+ `LocationUri` - 统一资源标识符 (uri)，不少于 1 个字节或超过 1024 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  数据库的位置（例如，HDFS 路径）。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对定义数据库的参数和属性。
+ `CreateTime` – 时间戳。

  在目录中创建元数据数据库的时间。
+ `CreateTableDefaultPermissions` – [PrincipalPermissions](#aws-glue-api-catalog-databases-PrincipalPermissions) 对象的数组。

  在委托人表上创建一组默认权限。由 AWS Lake Formation 使用。正常的 AWS Glue 操作过程中不使用。
+ `TargetDatabase` – 一个 [DatabaseIdentifier](#aws-glue-api-catalog-databases-DatabaseIdentifier) 对象。

  描述用于资源链接的目标数据库的 `DatabaseIdentifier` 结构。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  数据库所在的数据目录的 ID。
+ `FederatedDatabase` – 一个 [联合数据库](#aws-glue-api-catalog-databases-FederatedDatabase) 对象。

  一种引用 AWS Glue Data Catalog 外部实体的 `FederatedDatabase` 结构。

## DatabaseInput 结构
<a name="aws-glue-api-catalog-databases-DatabaseInput"></a>

用于创建或更新数据库的结构。

**字段**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  数据库的名称。为了确保 Hive 兼容性，它在存储时被转换为小写。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  对数据库的描述。
+ `LocationUri` - 统一资源标识符 (uri)，不少于 1 个字节或超过 1024 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  数据库的位置（例如，HDFS 路径）。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对定义数据库的参数和属性。

  这些键值对定义数据库的参数和属性。
+ `CreateTableDefaultPermissions` – [PrincipalPermissions](#aws-glue-api-catalog-databases-PrincipalPermissions) 对象的数组。

  在委托人表上创建一组默认权限。由 AWS Lake Formation 使用。正常的 AWS Glue 操作过程中不使用。
+ `TargetDatabase` – 一个 [DatabaseIdentifier](#aws-glue-api-catalog-databases-DatabaseIdentifier) 对象。

  描述用于资源链接的目标数据库的 `DatabaseIdentifier` 结构。
+ `FederatedDatabase` – 一个 [联合数据库](#aws-glue-api-catalog-databases-FederatedDatabase) 对象。

  一种引用 AWS Glue Data Catalog 外部实体的 `FederatedDatabase` 结构。

## PrincipalPermissions 结构
<a name="aws-glue-api-catalog-databases-PrincipalPermissions"></a>

向委托人授予的权限。

**字段**
+ `Principal` – 一个 [DataLakePrincipal](#aws-glue-api-catalog-databases-DataLakePrincipal) 对象。

  被授予权限的委托人。
+ `Permissions` – UTF-8 字符串数组。

  向委托人授予的权限。

## DataLakePrincipal 结构
<a name="aws-glue-api-catalog-databases-DataLakePrincipal"></a>

AWS Lake Formation 委托人。

**字段**
+ `DataLakePrincipalIdentifier` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节。

  AWS Lake Formation 委托人的标识符。

## DatabaseIdentifier 结构
<a name="aws-glue-api-catalog-databases-DatabaseIdentifier"></a>

描述用于资源链接的目标数据库的结构。

**字段**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  数据库所在的数据目录的 ID。
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目录数据库的名称。
+ `Region` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目标数据库的区域。

## 联合数据库结构
<a name="aws-glue-api-catalog-databases-FederatedDatabase"></a>

指向 AWS Glue Data Catalog 外部实体的数据库。

**字段**
+ `Identifier` – UTF-8 字符串，长度不少于 1 个字节或超过 512 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  联合数据库的唯一标识符。
+ `ConnectionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  与外部元存储连接的名称。
+ `ConnectionType` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于访问联合数据库的连接类型，例如 JDBC、ODBC 或其他支持的连接协议。

## 操作
<a name="aws-glue-api-catalog-databases-actions"></a>
+ [CreateDatabase 操作（Python：create\$1database）](#aws-glue-api-catalog-databases-CreateDatabase)
+ [UpdateDatabase 操作（Python：update\$1database）](#aws-glue-api-catalog-databases-UpdateDatabase)
+ [DeleteDatabase 操作（Python：delete\$1database）](#aws-glue-api-catalog-databases-DeleteDatabase)
+ [GetDatabase 操作（Python：get\$1database）](#aws-glue-api-catalog-databases-GetDatabase)
+ [GetDatabases 操作（Python：get\$1databases）](#aws-glue-api-catalog-databases-GetDatabases)

## CreateDatabase 操作（Python：create\$1database）
<a name="aws-glue-api-catalog-databases-CreateDatabase"></a>

在数据目录中创建新数据库。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建数据库的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseInput` – *必填：*一个 [DatabaseInput](#aws-glue-api-catalog-databases-DatabaseInput) 对象。

  数据库的元数据。
+ `Tags` – 键值对的映射数组，不超过 50 对。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值是一个 UTF-8 字符串，不超过 256 个字节。

  您分配给数据库的标签。

**响应**
+ *无响应参数。*

**错误**
+ `InvalidInputException`
+ `AlreadyExistsException`
+ `ResourceNumberLimitExceededException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ConcurrentModificationException`
+ `FederatedResourceAlreadyExistsException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## UpdateDatabase 操作（Python：update\$1database）
<a name="aws-glue-api-catalog-databases-UpdateDatabase"></a>

在数据目录中更新现有数据库定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  元数据数据库所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在目录中更新的数据库的名称。对于 Hive 兼容性，它会转化为小写。
+ `DatabaseInput` – *必填：*一个 [DatabaseInput](#aws-glue-api-catalog-databases-DatabaseInput) 对象。

  一个 `DatabaseInput` 对象，在目录中指定元数据数据库的新定义。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ConcurrentModificationException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`
+ `AlreadyExistsException`

## DeleteDatabase 操作（Python：delete\$1database）
<a name="aws-glue-api-catalog-databases-DeleteDatabase"></a>

从数据目录中删除指定的数据库。

**注意**  
完成此操作后，您将无法再访问已删除的数据库中的这些表（以及可能属于这些表的所有表版本和分区）和用户定义函数。AWS Glue 会及时以异步方式删除这些“孤立”资源，这由服务决定。  
为了确保立即删除所有相关资源，在调用 `DeleteDatabase` 之前，请使用 `DeleteTableVersion` 或 `BatchDeleteTableVersion`、`DeletePartition` 或 `BatchDeletePartition`、`DeleteUserDefinedFunction` 和 `DeleteTable` 或 `BatchDeleteTable`，删除属于该数据库的所有资源。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  数据库所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的数据库的名称。对于 Hive 兼容性，它必须是全部小写的。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `ConcurrentModificationException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## GetDatabase 操作（Python：get\$1database）
<a name="aws-glue-api-catalog-databases-GetDatabase"></a>

检索指定数据库的定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  数据库所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要检索的数据库的名称。对于 Hive 兼容性，它应该是全部小写的。

**响应**
+ `Database` – 一个 [数据库](#aws-glue-api-catalog-databases-Database) 对象。

  数据目录中指定数据库的定义。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## GetDatabases 操作（Python：get\$1databases）
<a name="aws-glue-api-catalog-databases-GetDatabases"></a>

检索在给定数据目录中定义的所有数据库。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中检索 `Databases` 的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  要在一个响应中返回的数据库的最大数量。
+ `ResourceShareType` – UTF-8 字符串（有效值：`FOREIGN` \$1 `ALL` \$1 `FEDERATED`）。

  允许您指定要列出与您的账户共享的数据库。允许的值是 `FEDERATED`、`FOREIGN` 或 `ALL`。
  + 如果设置为 `FEDERATED`，将列出与您的账户共享的联合数据库（引用外部实体）。
  + 如果设置为 `FOREIGN`，将列出与您的账户共享的数据库。
  + 如果设置为 `ALL`，将列出与您的账户共享的数据库，以及本地账户中的数据库。
+ `AttributesToGet` – UTF-8 字符串数组。

  指定 `GetDatabases` 调用返回的数据库字段。此参数不接受空列表。请求中必须包含 `NAME`。

**响应**
+ `DatabaseList` – *必填：*[数据库](#aws-glue-api-catalog-databases-Database) 对象的数组。

  指定目录中的 `Database` 对象的列表。
+ `NextToken` – UTF-8 字符串。

  对返回的标记列表进行分页的延续令牌 (如果列表的当前片段不是最后一个，则返回)。

**错误**
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `EntityNotFoundException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

# 表 API
<a name="aws-glue-api-catalog-tables"></a>

表 API 介绍与表关联的数据类型和操作。

## 数据类型
<a name="aws-glue-api-catalog-tables-objects"></a>
+ [Table 结构](#aws-glue-api-catalog-tables-Table)
+ [TableInput 结构](#aws-glue-api-catalog-tables-TableInput)
+ [联合表结构](#aws-glue-api-catalog-tables-FederatedTable)
+ [列结构](#aws-glue-api-catalog-tables-Column)
+ [StorageDescriptor 结构](#aws-glue-api-catalog-tables-StorageDescriptor)
+ [SchemaReference 结构](#aws-glue-api-catalog-tables-SchemaReference)
+ [SerDeInfo 结构](#aws-glue-api-catalog-tables-SerDeInfo)
+ [Order 结构](#aws-glue-api-catalog-tables-Order)
+ [SkewedInfo 结构](#aws-glue-api-catalog-tables-SkewedInfo)
+ [TableVersion 结构](#aws-glue-api-catalog-tables-TableVersion)
+ [TableError 结构](#aws-glue-api-catalog-tables-TableError)
+ [TableVersionError 结构](#aws-glue-api-catalog-tables-TableVersionError)
+ [SortCriterion 结构](#aws-glue-api-catalog-tables-SortCriterion)
+ [TableIdentifier 结构](#aws-glue-api-catalog-tables-TableIdentifier)
+ [KeySchemaElement 结构](#aws-glue-api-catalog-tables-KeySchemaElement)
+ [PartitionIndex 结构](#aws-glue-api-catalog-tables-PartitionIndex)
+ [PartitionIndexDescriptor 结构](#aws-glue-api-catalog-tables-PartitionIndexDescriptor)
+ [BackfillError 结构](#aws-glue-api-catalog-tables-BackfillError)
+ [IcebergInput 结构](#aws-glue-api-catalog-tables-IcebergInput)
+ [OpenTableFormatInput 结构](#aws-glue-api-catalog-tables-OpenTableFormatInput)
+ [ViewDefinition 结构](#aws-glue-api-catalog-tables-ViewDefinition)
+ [ViewDefinitionInput 结构](#aws-glue-api-catalog-tables-ViewDefinitionInput)
+ [ViewRepresentation 结构](#aws-glue-api-catalog-tables-ViewRepresentation)
+ [ViewRepresentationInput 结构](#aws-glue-api-catalog-tables-ViewRepresentationInput)
+ [UpdateOpenTableFormatInput 结构](#aws-glue-api-catalog-tables-UpdateOpenTableFormatInput)
+ [UpdateIcebergInput 结构](#aws-glue-api-catalog-tables-UpdateIcebergInput)
+ [CreateIcebergTableInput 结构](#aws-glue-api-catalog-tables-CreateIcebergTableInput)
+ [UpdateIcebergTableInput 结构](#aws-glue-api-catalog-tables-UpdateIcebergTableInput)
+ [IcebergSortOrder 结构](#aws-glue-api-catalog-tables-IcebergSortOrder)
+ [IcebergSortField 结构](#aws-glue-api-catalog-tables-IcebergSortField)
+ [IcebergPartitionSpec 结构](#aws-glue-api-catalog-tables-IcebergPartitionSpec)
+ [IcebergPartitionField 结构](#aws-glue-api-catalog-tables-IcebergPartitionField)
+ [IcebergSchema 结构](#aws-glue-api-catalog-tables-IcebergSchema)
+ [IcebergStructField 结构](#aws-glue-api-catalog-tables-IcebergStructField)
+ [IcebergTableUpdate 结构](#aws-glue-api-catalog-tables-IcebergTableUpdate)
+ [AuditContext 结构](#aws-glue-api-catalog-tables-AuditContext)

## Table 结构
<a name="aws-glue-api-catalog-tables-Table"></a>

表示用列和行组织的相关数据的集合。

**Fields**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表名称。对于 Hive 兼容性，它必须是完全小写的。
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表元数据所在的数据库名称。对于 Hive 兼容性，它必须是全部小写的。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  对表的描述。
+ `Owner` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表的所有者。
+ `CreateTime` – 时间戳。

  在数据目录中创建表定义的时间。
+ `UpdateTime` – 时间戳。

  上次更新该表的时间。
+ `LastAccessTime` – 时间戳。

  上次访问该表的时间。这通常取自 HDFS，可能不可靠。
+ `LastAnalyzedTime` – 时间戳。

  上次计算此表的列统计信息的时间。
+ `Retention` – 数字（整数），至多为“无”。

  此表的保留时间。
+ `StorageDescriptor` – 一个 [StorageDescriptor](aws-glue-api-catalog-partitions.md#aws-glue-api-catalog-partitions-StorageDescriptor) 对象。

  一个存储描述符，包含有关此表的物理存储的信息。
+ `PartitionKeys` – [列](#aws-glue-api-catalog-tables-Column) 对象的数组。

  表进行分区所依据的列的列表。仅支持基元类型作为分区键。

  创建 Amazon Athena 使用的表时，如果未指定任何 `partitionKeys`，则必须至少将 `partitionKeys` 的值设置为空列表。例如：

  `"PartitionKeys": []`
+ `ViewOriginalText` – UTF-8 字符串，不超过 409600 个字节。

  随附以实现 Apache Hive 兼容性。正常的 AWS Glue 操作过程中不使用。如果表为 `VIRTUAL_VIEW`，则特定 Athena 配置编码为 base64。
+ `ViewExpandedText` – UTF-8 字符串，不超过 409600 个字节。

  随附以实现 Apache Hive 兼容性。正常的 AWS Glue 操作过程中不使用。
+ `TableType` – UTF-8 字符串，不超过 255 个字节。

  该表的类型。AWS Glue 将创建 `EXTERNAL_TABLE` 类型的表。其他服务（例如 Athena）可能会创建其他表类型的表。

  AWS Glue 相关表类型：  
EXTERNAL\$1TABLE  
Hive 兼容属性 - 表示非 Hive 托管表。  
GOVERNED  
由 AWS Lake Formation 使用。AWS Glue Data Catalog 了解 `GOVERNED`。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对定义了与此表关联的属性。
+ `CreatedBy` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  创建表的人员或实体。
+ `IsRegisteredWithLakeFormation` – 布尔值。

  指示表是否已注册到 AWS Lake Formation。
+ `TargetTable` – 一个 [TableIdentifier](#aws-glue-api-catalog-tables-TableIdentifier) 对象。

  描述用于资源链接的目标表的 `TableIdentifier` 结构。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。
+ `VersionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表版本 ID。
+ `FederatedTable` – 一个 [联合表](#aws-glue-api-catalog-tables-FederatedTable) 对象。

  一种引用 AWS Glue Data Catalog 外部实体的 `FederatedTable` 结构。
+ `ViewDefinition` – 一个 [ViewDefinition](#aws-glue-api-catalog-tables-ViewDefinition) 对象。

  包含定义视图的所有信息的结构，包括视图的一个或多个方言和查询。
+ `IsMultiDialectView` – 布尔值。

  指定视图是否支持一个或多个不同查询引擎的 SQL 方言，因此可以由这些引擎读取。

## TableInput 结构
<a name="aws-glue-api-catalog-tables-TableInput"></a>

用于定义表的结构。

**Fields**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表名称。为了确保 Hive 兼容性，它在存储时被转换为小写。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  对表的描述。
+ `Owner` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所有者。随附以实现 Apache Hive 兼容性。正常的 AWS Glue 操作过程中不使用。
+ `LastAccessTime` – 时间戳。

  上次访问该表的时间。
+ `LastAnalyzedTime` – 时间戳。

  上次计算此表的列统计信息的时间。
+ `Retention` – 数字（整数），至多为“无”。

  此表的保留时间。
+ `StorageDescriptor` – 一个 [StorageDescriptor](aws-glue-api-catalog-partitions.md#aws-glue-api-catalog-partitions-StorageDescriptor) 对象。

  一个存储描述符，包含有关此表的物理存储的信息。
+ `PartitionKeys` – [列](#aws-glue-api-catalog-tables-Column) 对象的数组。

  表进行分区所依据的列的列表。仅支持基元类型作为分区键。

  创建 Amazon Athena 使用的表时，如果未指定任何 `partitionKeys`，则必须至少将 `partitionKeys` 的值设置为空列表。例如：

  `"PartitionKeys": []`
+ `ViewOriginalText` – UTF-8 字符串，不超过 409600 个字节。

  随附以实现 Apache Hive 兼容性。正常的 AWS Glue 操作过程中不使用。如果表为 `VIRTUAL_VIEW`，则特定 Athena 配置编码为 base64。
+ `ViewExpandedText` – UTF-8 字符串，不超过 409600 个字节。

  随附以实现 Apache Hive 兼容性。正常的 AWS Glue 操作过程中不使用。
+ `TableType` – UTF-8 字符串，不超过 255 个字节。

  该表的类型。AWS Glue 将创建 `EXTERNAL_TABLE` 类型的表。其他服务（例如 Athena）可能会创建其他表类型的表。

  AWS Glue 相关表类型：  
EXTERNAL\$1TABLE  
Hive 兼容属性 - 表示非 Hive 托管表。  
GOVERNED  
由 AWS Lake Formation 使用。AWS Glue Data Catalog 了解 `GOVERNED`。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对定义了与此表关联的属性。
+ `TargetTable` – 一个 [TableIdentifier](#aws-glue-api-catalog-tables-TableIdentifier) 对象。

  描述用于资源链接的目标表的 `TableIdentifier` 结构。
+ `ViewDefinition` – 一个 [ViewDefinitionInput](#aws-glue-api-catalog-tables-ViewDefinitionInput) 对象。

  包含定义视图的所有信息的结构，包括视图的一个或多个方言和查询。

## 联合表结构
<a name="aws-glue-api-catalog-tables-FederatedTable"></a>

指向 AWS Glue Data Catalog 外部实体的表。

**Fields**
+ `Identifier` – UTF-8 字符串，长度不少于 1 个字节或超过 512 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  联合表的唯一标识符。
+ `DatabaseIdentifier` – UTF-8 字符串，长度不少于 1 个字节或超过 512 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  联合数据库的唯一标识符。
+ `ConnectionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  与外部元存储连接的名称。
+ `ConnectionType` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于访问联合表的连接类型，指定连接外部数据来源的协议或方法。

## 列结构
<a name="aws-glue-api-catalog-tables-Column"></a>

`Table` 中的列。

**Fields**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  `Column` 的名称。
+ `Type` – UTF-8 字符串，不超过 131072 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  `Column` 的数据类型。
+ `Comment` – 注释字符串，不超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  自由格式的文本注释。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键/值对定义了与此列关联的属性。

## StorageDescriptor 结构
<a name="aws-glue-api-catalog-tables-StorageDescriptor"></a>

描述表数据的物理存储。

**Fields**
+ `Columns` – [列](#aws-glue-api-catalog-tables-Column) 对象的数组。

  表中的 `Columns` 的列表。
+ `Location` – 位置字符串，不超过 2056 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  表的物理位置。默认情况下，它采用仓库位置的形式，后跟仓库中的数据库位置，然后是表名称。
+ `AdditionalLocations` – UTF-8 字符串数组。

  指向 Delta 表所在路径的位置列表。
+ `InputFormat` – 格式字符串，不超过 128 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  输入格式：`SequenceFileInputFormat`（二进制）或 `TextInputFormat` 或自定义格式。
+ `OutputFormat` – 格式字符串，不超过 128 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  输出格式：`SequenceFileOutputFormat`（二进制）、`IgnoreKeyTextOutputFormat` 或自定义格式。
+ `Compressed` – 布尔值。

  如果对表中的数据进行压缩，则为 `True`，否则为 `False`。
+ `NumberOfBuckets` – 数字（整数）。

  如果表包含任何维度列，则必须指定。
+ `SerdeInfo` – 一个 [SerDeInfo](aws-glue-api-catalog-partitions.md#aws-glue-api-catalog-partitions-SerDeInfo) 对象。

  序列化/反序列化（SerDe）信息。
+ `BucketColumns` – UTF-8 字符串数组。

  表中的 Reducer 分组列、集群列以及桶列的列表。
+ `SortColumns` – [顺序](#aws-glue-api-catalog-tables-Order) 对象的数组。

  指定表中的每个桶的排序顺序的列表。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  使用键/值形式的用户提供的属性。
+ `SkewedInfo` – 一个 [SkewedInfo](aws-glue-api-catalog-partitions.md#aws-glue-api-catalog-partitions-SkewedInfo) 对象。

  有关在列中经常出现的值（偏斜值）的信息。
+ `StoredAsSubDirectories` – 布尔值。

  如果表数据存储在子目录中，则为 `True`，否则为 `False`。
+ `SchemaReference` – 一个 [SchemaReference](aws-glue-api-catalog-partitions.md#aws-glue-api-catalog-partitions-SchemaReference) 对象。

  引用存储在 AWS Glue 架构注册表中的架构的对象。

  创建表时，可以为架构传递列的空列表，而使用架构引用。

## SchemaReference 结构
<a name="aws-glue-api-catalog-tables-SchemaReference"></a>

引用存储在 AWS Glue 架构注册表中的架构的对象。

**Fields**
+ `SchemaId` – 一个 [SchemaId](aws-glue-api-schema-registry-api.md#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的结构。必须提供此值或 `SchemaVersionId`。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  分配给架构版本的唯一 ID。必须提供此值或 `SchemaId`。
+ `SchemaVersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。

## SerDeInfo 结构
<a name="aws-glue-api-catalog-tables-SerDeInfo"></a>

有关序列化/反序列化程序（SerDe）的信息，它用作抽取器和加载器。

**Fields**
+ `Name` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  SerDe 的名称。
+ `SerializationLibrary` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  通常是实现 SerDe 的类。例如，`org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe`。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对用于定义 SerDe 的初始化参数。

## Order 结构
<a name="aws-glue-api-catalog-tables-Order"></a>

指定排序列的排序顺序。

**Fields**
+ `Column` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  列的名称。
+ `SortOrder` – *必填：*数字（整数），不大于 1。

  指示是按升序（`== 1`）还是降序（`==0`）对列进行排序。

## SkewedInfo 结构
<a name="aws-glue-api-catalog-tables-SkewedInfo"></a>

指定表中的偏斜值。偏斜值是指出现频率很高的值。

**Fields**
+ `SkewedColumnNames` – UTF-8 字符串数组。

  包含偏斜值的列名称的列表。
+ `SkewedColumnValues` – UTF-8 字符串数组。

  经常被认为是偏斜的值的列表。
+ `SkewedColumnValueLocationMaps` – 键值对的映射数组。

  每个键是一个 UTF-8 字符串。

  每个值是一个 UTF-8 字符串。

  偏斜值到包含它们的列的映射。

## TableVersion 结构
<a name="aws-glue-api-catalog-tables-TableVersion"></a>

指定表的版本。

**Fields**
+ `Table` – 一个 [表](#aws-glue-api-catalog-tables-Table) 对象。

  所涉表。
+ `VersionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  标识此表版本的 ID 值。`VersionId` 是整数的字符串表示。每个版本都会增加 1。

## TableError 结构
<a name="aws-glue-api-catalog-tables-TableError"></a>

表操作的错误记录。

**Fields**
+ `TableName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表的名称。对于 Hive 兼容性，它必须是完全小写的。
+ `ErrorDetail` – 一个 [ErrorDetail](aws-glue-api-common.md#aws-glue-api-common-ErrorDetail) 对象。

  有关错误的详细信息。

## TableVersionError 结构
<a name="aws-glue-api-catalog-tables-TableVersionError"></a>

表版本操作的错误记录。

**Fields**
+ `TableName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  相关表的名称。
+ `VersionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉版本的 ID 值。`VersionID` 是整数的字符串表示。每个版本都会增加 1。
+ `ErrorDetail` – 一个 [ErrorDetail](aws-glue-api-common.md#aws-glue-api-common-ErrorDetail) 对象。

  有关错误的详细信息。

## SortCriterion 结构
<a name="aws-glue-api-catalog-tables-SortCriterion"></a>

指定要作为排序依据的字段和排序顺序。

**Fields**
+ `FieldName`：值字符串，长度不少于 1 个字节，不超过 1024 个字节。

  要作为排序依据的字段的名称。
+ `Sort` – UTF-8 字符串（有效值：`ASC="ASCENDING"` \$1`DESC="DESCENDING"` ）。

  升序或降序排序。

## TableIdentifier 结构
<a name="aws-glue-api-catalog-tables-TableIdentifier"></a>

描述用于资源链接的目标表的结构。

**Fields**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含目标表的目录数据库的名称。
+ `Name` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目标表的名称。
+ `Region` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目标表的区域。

## KeySchemaElement 结构
<a name="aws-glue-api-catalog-tables-KeySchemaElement"></a>

由名称和类型组成的分区密钥对。

**Fields**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区键的名称。
+ `Type` – *必填*：UTF-8 字符串，长度不超过 131072 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区键的类型。

## PartitionIndex 结构
<a name="aws-glue-api-catalog-tables-PartitionIndex"></a>

分区索引的结构。

**Fields**
+ `Keys` – *必填：*UTF-8 字符串数组，至少 1 个字符串。

  分区索引的键。
+ `IndexName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区索引的名称。

## PartitionIndexDescriptor 结构
<a name="aws-glue-api-catalog-tables-PartitionIndexDescriptor"></a>

表中分区索引的描述符。

**Fields**
+ `IndexName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区索引的名称。
+ `Keys` – *必填*：[KeySchemaElement](#aws-glue-api-catalog-tables-KeySchemaElement)对象的数组，至少有 1 个结构。

  一个或多个键的列表，例如 `KeySchemaElement` 结构，用于分区索引。
+ `IndexStatus` – *必填*：UTF-8 字符串（有效值：`CREATING` \$1 `ACTIVE` \$1 `DELETING` \$1 `FAILED`）。

  分区索引的状态。

  可能状态包括：
  + CREATING：正在创建索引。当索引处于 CREATING 状态时，无法删除索引或其表。
  + ACTIVE：索引创建成功。
  + FAILED：索引创建失败。
  + DELETING：索引将从索引列表中删除。
+ `BackfillErrors` – [BackfillError](#aws-glue-api-catalog-tables-BackfillError) 对象的数组。

  为现有表注册分区索引时可能发生的错误列表。

## BackfillError 结构
<a name="aws-glue-api-catalog-tables-BackfillError"></a>

为现有表注册分区索引时可能发生的错误列表。

这些错误提供了有关索引注册失败的原因的详细信息，并在响应中提供了有限数量的分区，以便您可以在故障时修复分区并尝试重新注册索引。可能发生的最常见错误集分类如下：
+ EncryptedPartitionError：分区已加密。
+ InvalidPartitionTypeDataError：分区值与该分区列的数据类型不匹配。
+ MissingPartitionValueError：分区已加密。
+ UnsupportedPartitionCharacterError：不支持分区值内的字符。例如：U\$10000、U\$10001 和 U\$10002。
+ InternalError：任何不属于其他错误代码的错误。

**Fields**
+ `Code` – UTF-8 字符串（有效值：`ENCRYPTED_PARTITION_ERROR` \$1`INTERNAL_ERROR` \$1`INVALID_PARTITION_TYPE_DATA_ERROR` \$1`MISSING_PARTITION_VALUE_ERROR` \$1`UNSUPPORTED_PARTITION_CHARACTER_ERROR` ）。

  为现有表注册分区索引时发生的错误代码。
+ `Partitions` – [PartitionValueList](aws-glue-api-catalog-partitions.md#aws-glue-api-catalog-partitions-PartitionValueList) 对象的数组。

  响应中有限数量的分区列表。

## IcebergInput 结构
<a name="aws-glue-api-catalog-tables-IcebergInput"></a>

一种结构，用于定义要在目录中创建的 Apache Iceberg 元数据表。

**Fields**
+ `MetadataOperation` – *必填*：UTF-8 字符串（有效值：`CREATE`）。

  必需的元数据操作。只能设置为 `CREATE`。
+ `Version` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  Iceberg 表的表格版本。默认值为 2。
+ `CreateIcebergTableInput` – 一个 [CreateIcebergTableInput](#aws-glue-api-catalog-tables-CreateIcebergTableInput) 对象。

  在 AWS Glue Data Catalog 中创建新 Iceberg 表所需的配置参数，包括表属性和元数据规范。

## OpenTableFormatInput 结构
<a name="aws-glue-api-catalog-tables-OpenTableFormatInput"></a>

一种表示开放格式表的结构。

**Fields**
+ `IcebergInput` – 一个 [IcebergInput](#aws-glue-api-catalog-tables-IcebergInput) 对象。

  指定用于定义 Apache Iceberg 元数据表的 `IcebergInput` 结构。

## ViewDefinition 结构
<a name="aws-glue-api-catalog-tables-ViewDefinition"></a>

包含表示形式详细信息的结构。

**Fields**
+ `IsProtected` – 布尔值。

  您可以将此标志设置为 true，以指示引擎在查询规划期间不要将用户提供的操作推送到视图的逻辑计划中。但是，设置此标志并不能保证引擎将遵循此要求。请参阅引擎的文档以了解所提供的保证（如果有）。
+ `Definer` – UTF-8 字符串，不少于 20 个字节，不超过 2048 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  SQL 中视图的定义者。
+ `SubObjects` – UTF-8 字符串数组，不超过 10 个字符串。

  包含表 Amazon 资源名称（ARN）的列表。
+ `Representations` – [ViewRepresentation](#aws-glue-api-catalog-tables-ViewRepresentation)对象的数组，不少于 1 个或不超过 1000 个结构。

  包含表示形式的列表。

## ViewDefinitionInput 结构
<a name="aws-glue-api-catalog-tables-ViewDefinitionInput"></a>

包含用于创建或更新 AWS Glue 视图的详细信息的结构。

**Fields**
+ `IsProtected` – 布尔值。

  您可以将此标志设置为 true，以指示引擎在查询规划期间不要将用户提供的操作推送到视图的逻辑计划中。但是，设置此标志并不能保证引擎将遵循此要求。请参阅引擎的文档以了解所提供的保证（如果有）。
+ `Definer` – UTF-8 字符串，不少于 20 个字节，不超过 2048 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  SQL 中视图的定义者。
+ `Representations` – [ViewRepresentationInput](#aws-glue-api-catalog-tables-ViewRepresentationInput) 对象的数组，长度不少于 1 个结构，不超过 10 个结构。

  包含视图方言和定义视图的查询的结构列表。
+ `SubObjects` – UTF-8 字符串数组，不超过 10 个字符串。

  包含构成视图的基表 ARN 列表。

## ViewRepresentation 结构
<a name="aws-glue-api-catalog-tables-ViewRepresentation"></a>

包含视图方言和定义视图的查询的结构。

**Fields**
+ `Dialect` – UTF-8 字符串（有效值：`REDSHIFT` \$1`ATHENA` \$1`SPARK` ）。

  查询引擎的方言。
+ `DialectVersion` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节。

  查询引擎的方言版本。例如 3.0.0。
+ `ViewOriginalText` – UTF-8 字符串，不超过 409600 个字节。

  客户在 `CREATE VIEW DDL` 期间提供的 `SELECT` 查询。在对视图进行查询时不使用此 SQL（现改为使用 `ViewExpandedText`）。`ViewOriginalText` 用于 `SHOW CREATE VIEW` 等情况（当用户想要查看创建视图的原始 DDL 命令时）。
+ `ViewExpandedText` – UTF-8 字符串，不超过 409600 个字节。

  视图的扩展 SQL。引擎在处理视图查询时使用此 SQL。在视图创建过程中，引擎可能会执行操作，将 `ViewOriginalText` 转换为 `ViewExpandedText`。例如：
  + 完全限定的标识符：`SELECT * from table1 -> SELECT * from db1.table1`
+ `ValidationConnection` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于验证视图的特定表示形式的连接的名称。
+ `IsStale` – 布尔值。

  标记为过时的方言不再有效，必须先进行更新，然后才能在其各自的查询引擎中进行查询。

## ViewRepresentationInput 结构
<a name="aws-glue-api-catalog-tables-ViewRepresentationInput"></a>

包含表示形式详细信息的结构，用于更新或创建 Lake Formation 视图。

**Fields**
+ `Dialect` – UTF-8 字符串（有效值：`REDSHIFT` \$1`ATHENA` \$1`SPARK` ）。

  用于指定特定表示形式的引擎类型的参数。
+ `DialectVersion` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节。

  用于指定特定表示形式的引擎版本的参数。
+ `ViewOriginalText` – UTF-8 字符串，不超过 409600 个字节。

  用于表示描述视图的原始 SQL 查询的字符串。
+ `ValidationConnection` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于验证视图的特定表示形式的连接的名称。
+ `ViewExpandedText` – UTF-8 字符串，不超过 409600 个字节。

  表示 SQL 查询的字符串，该查询描述了带有扩展资源 ARN 的视图

## UpdateOpenTableFormatInput 结构
<a name="aws-glue-api-catalog-tables-UpdateOpenTableFormatInput"></a>

用于更新 AWS Glue Data Catalog 中开放表格式表的输入参数，作为 Apache Iceberg 等格式特定更新操作的封装器。

**Fields**
+ `UpdateIcebergInput` – 一个 [UpdateIcebergInput](#aws-glue-api-catalog-tables-UpdateIcebergInput) 对象。

  Apache Iceberg 特定更新参数，用于定义要应用的表修改，包括架构更改、分区规范和表属性。

## UpdateIcebergInput 结构
<a name="aws-glue-api-catalog-tables-UpdateIcebergInput"></a>

更新 AWS Glue Data Catalog 中 Apache Iceberg 表的特定输入参数，其中包含要应用于现有 Iceberg 表的更新操作。

**Fields**
+ `UpdateIcebergTableInput` – *必填：*一个 [UpdateIcebergTableInput](#aws-glue-api-catalog-tables-UpdateIcebergTableInput) 对象。

  要应用于 Iceberg 表的具体更新操作，其中包含定义表新状态的更新列表，包括架构、分区和属性。

## CreateIcebergTableInput 结构
<a name="aws-glue-api-catalog-tables-CreateIcebergTableInput"></a>

在 AWS Glue Data Catalog 中创建新 Iceberg 表所需的配置参数，包括表属性和元数据规范。

**Fields**
+ `Location`：*（必填）*位置字符串，长度不超过 2056 个字节，应符合 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 模式。

  将用于存储 Iceberg 表数据的 S3 位置。
+ `Schema` – *必填：*一个 [IcebergSchema](#aws-glue-api-catalog-tables-IcebergSchema) 对象。

  架构定义，用于指定 Iceberg 表结构、字段类型和元数据。
+ `PartitionSpec` – 一个 [IcebergPartitionSpec](#aws-glue-api-catalog-tables-IcebergPartitionSpec) 对象。

  分区规范，用于定义如何对 Iceberg 表数据进行组织和分区以实现最佳查询性能。
+ `WriteOrder` – 一个 [IcebergSortOrder](#aws-glue-api-catalog-tables-IcebergSortOrder) 对象。

  排序顺序规范，用于定义如何对每个分区内的数据进行排序以优化查询性能。
+ `Properties` – 

  用于定义 Iceberg 表的其他表属性和配置设置的键值对。

## UpdateIcebergTableInput 结构
<a name="aws-glue-api-catalog-tables-UpdateIcebergTableInput"></a>

包含要应用于 AWS Glue Data Catalog 中现有 Iceberg 表的更新操作，用于定义表元数据的新状态。

**Fields**
+ `Updates` – *必填：*[IcebergTableUpdate](#aws-glue-api-catalog-tables-IcebergTableUpdate) 对象的数组。

  表更新操作列表，用于指定要对 Iceberg 表执行的更改，包括架构修改、分区规范和表属性。

## IcebergSortOrder 结构
<a name="aws-glue-api-catalog-tables-IcebergSortOrder"></a>

定义 Iceberg 表的排序顺序规范，用于确定如何对分区内的数据进行排序以优化查询性能。

**Fields**
+ `OrderId` – *必填*：数字（整数）。

  该排序顺序规范在 Iceberg 表元数据中的唯一标识符。
+ `Fields` – *必填：*[IcebergSortField](#aws-glue-api-catalog-tables-IcebergSortField) 对象的数组。

  字段列表及其排序方向，用于定义 Iceberg 表数据的排序标准。

## IcebergSortField 结构
<a name="aws-glue-api-catalog-tables-IcebergSortField"></a>

定义 Iceberg 排序顺序规范中的单个字段，包括源字段、转换、排序方向和空值排序规则。

**Fields**
+ `SourceId` – *必填*：数字（整数）。

  源字段在该排序字段所基于的表架构中的标识符。
+ `Transform` – *必填：*UTF-8 字符串。

  排序前应用于源字段的转换函数，例如身份、存储桶或截断。
+ `Direction` – *必填：*UTF-8 字符串（有效值：`asc="ASC"` \$1 `desc="DESC"`）。

  该字段的排序方向，或为升序，或为降序。
+ `NullOrder` – *必填：*UTF-8 字符串（有效值：`nulls-first="NULLS_FIRST"` \$1 `nulls-last="NULLS_LAST"`）。

  该字段中空值的排序行为，用于指定空值在排序时应排在第一位还是最后一位。

## IcebergPartitionSpec 结构
<a name="aws-glue-api-catalog-tables-IcebergPartitionSpec"></a>

定义 Iceberg 表的分区规范，确定如何对表数据进行组织和分区以获得最佳查询性能。

**Fields**
+ `Fields` – *必填：*[IcebergPartitionField](#aws-glue-api-catalog-tables-IcebergPartitionField) 对象的数组。

  分区字段列表，用于定义应如何对表数据进行分区，包括源字段及其转换。
+ `SpecId` – 数字（整数）。

  该分区规范在 Iceberg 表元数据历史记录中的唯一标识符。

## IcebergPartitionField 结构
<a name="aws-glue-api-catalog-tables-IcebergPartitionField"></a>

定义 Iceberg 分区规范中的单个分区依据字段，包括源字段、转换函数、分区名称和唯一标识符。

**Fields**
+ `SourceId` – *必填*：数字（整数）。

  源字段在该分区依据字段所基于的表架构中的标识符。
+ `Transform` – *必填：*UTF-8 字符串。

  为了创建分区而应用于源字段的转换函数，例如身份、存储桶、截断、年、月、日或小时。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 1024 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区依据字段在分区表结构中显示的名称。
+ `FieldId` – 数字（整数）。

  在 Iceberg 表的分区规范中分配给该分区依据字段的唯一标识符。

## IcebergSchema 结构
<a name="aws-glue-api-catalog-tables-IcebergSchema"></a>

定义 Iceberg 表的架构结构，包括字段定义、数据类型和架构元数据。

**Fields**
+ `SchemaId` – 数字（整数）。

  该架构版本在 Iceberg 表的架构演变历史记录中的唯一标识符。
+ `IdentifierFieldIds`：一个由带符号的 32 位整数组成的数组。

  用于唯一标识表中记录的字段标识符列表，用于行级操作和重复数据删除。
+ `Type` – UTF-8 字符串（有效值：`struct="STRUCT"`）。

  架构结构的根类型，通常是 Iceberg 表架构的“结构体”。
+ `Fields` – *必填：*[IcebergStructField](#aws-glue-api-catalog-tables-IcebergStructField) 对象的数组。

  构成表架构的字段定义列表，包括字段名称、类型和元数据。

## IcebergStructField 结构
<a name="aws-glue-api-catalog-tables-IcebergStructField"></a>

定义 Iceberg 表架构中的单个字段，包括其标识符、名称、数据类型、可空性和文档。

**Fields**
+ `Id` – *必填*：数字（整数）。

  在 Iceberg 表架构中分配给该字段的唯一标识符，用于记录架构演变历史和字段跟踪。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 1024 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  在表架构和查询操作中显示的字段名称。
+ `Type`：*（必填）*名为 `IcebergDocument` 的空结构。

  该字段的数据类型定义，用于指定其所含数据的结构和格式。
+ `Required` – *必填：*布尔值。

  指示该字段在表架构中是必填字段（不可为空）还是可选字段（可为空）。
+ `Doc` – 注释字符串，不超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  可选的文档或描述文本，用于提供有关该字段用途和用法的更多背景信息。

## IcebergTableUpdate 结构
<a name="aws-glue-api-catalog-tables-IcebergTableUpdate"></a>

定义要应用于 Iceberg 表的完整更新，包括架构更改、分区修改、排序顺序调整、位置更新和属性更改。

**Fields**
+ `Schema` – *必填：*一个 [IcebergSchema](#aws-glue-api-catalog-tables-IcebergSchema) 对象。

  更新后的 Iceberg 表架构定义，用于指定对字段结构、数据类型或架构元数据的任何更改。
+ `PartitionSpec` – 一个 [IcebergPartitionSpec](#aws-glue-api-catalog-tables-IcebergPartitionSpec) 对象。

  更新后的分区规范，用于定义如何对表数据进行重新组织和分区。
+ `SortOrder` – 一个 [IcebergSortOrder](#aws-glue-api-catalog-tables-IcebergSortOrder) 对象。

  更新后的排序顺序规范，用于定义如何在分区内对数据进行排序以实现最佳查询性能。
+ `Location`：*（必填）*位置字符串，长度不超过 2056 个字节，应符合 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 模式。

  将用于存储 Iceberg 表数据的更新后的 S3 位置。
+ `Properties` – 

  Iceberg 表更新后的表属性和配置设置键值对。

## AuditContext 结构
<a name="aws-glue-api-catalog-tables-AuditContext"></a>

包含 Lake Formation 审计上下文的结构。

**Fields**
+ `AdditionalAuditContext` – UTF-8 字符串，长度不超过 2048 个字节。

  包含其他审计上下文信息的字符串。
+ `RequestedColumns` – UTF-8 字符串数组。

  请求的审计列。
+ `AllColumnsRequested` – 布尔值。

  所有列都请求审计。

## 操作
<a name="aws-glue-api-catalog-tables-actions"></a>
+ [CreateTable 操作（Python：create\$1table）](#aws-glue-api-catalog-tables-CreateTable)
+ [UpdateTable 操作（Python：update\$1table）](#aws-glue-api-catalog-tables-UpdateTable)
+ [DeleteTable 操作（Python：delete\$1table）](#aws-glue-api-catalog-tables-DeleteTable)
+ [BatchDeleteTable 操作（Python：batch\$1delete\$1table）](#aws-glue-api-catalog-tables-BatchDeleteTable)
+ [GetTable 操作（Python：get\$1table）](#aws-glue-api-catalog-tables-GetTable)
+ [GetTables 操作（Python：get\$1tables）](#aws-glue-api-catalog-tables-GetTables)
+ [GetTableVersion 操作（Python：get\$1table\$1version）](#aws-glue-api-catalog-tables-GetTableVersion)
+ [GetTableVersions 操作（Python：get\$1table\$1versions）](#aws-glue-api-catalog-tables-GetTableVersions)
+ [DeleteTableVersion 操作（Python：delete\$1table\$1version）](#aws-glue-api-catalog-tables-DeleteTableVersion)
+ [BatchDeleteTableVersion 操作（Python：batch\$1delete\$1table\$1version）](#aws-glue-api-catalog-tables-BatchDeleteTableVersion)
+ [SearchTables 操作（Python：search\$1tables）](#aws-glue-api-catalog-tables-SearchTables)
+ [GetPartitionIndexes 操作（Python：get\$1partition\$1indexes）](#aws-glue-api-catalog-tables-GetPartitionIndexes)
+ [CreatePartitionIndex 操作（Python：create\$1partition\$1index）](#aws-glue-api-catalog-tables-CreatePartitionIndex)
+ [DeletePartitionIndex 操作（Python：delete\$1partition\$1index）](#aws-glue-api-catalog-tables-DeletePartitionIndex)
+ [GetColumnStatisticsForTable 操作（Python：get\$1column\$1statistics\$1for\$1table）](#aws-glue-api-catalog-tables-GetColumnStatisticsForTable)
+ [UpdateColumnStatisticsForTable 操作（Python：update\$1column\$1statistics\$1for\$1table）](#aws-glue-api-catalog-tables-UpdateColumnStatisticsForTable)
+ [DeleteColumnStatisticsForTable 操作（Python：delete\$1column\$1statistics\$1for\$1table）](#aws-glue-api-catalog-tables-DeleteColumnStatisticsForTable)

## CreateTable 操作（Python：create\$1table）
<a name="aws-glue-api-catalog-tables-CreateTable"></a>

在数据目录中创建新表定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建 `Table` 的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建新表的目录数据库。对于 Hive 兼容性，此名称必须是完全小写的。
+ `Name` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  该表在将于 AWS Glue Data Catalog 中创建的指定数据库中的唯一标识符。
+ `TableInput` – 一个 [TableInput](#aws-glue-api-catalog-tables-TableInput) 对象。

  用于定义要在目录中创建的元数据表的 `TableInput` 对象。
+ `PartitionIndexes` – [PartitionIndex](#aws-glue-api-catalog-tables-PartitionIndex) 对象的数组，不超过 3 个结构。

  用于表中创建的分区索引和 `PartitionIndex` 结构的列表。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  事务的 ID。
+ `OpenTableFormatInput` – 一个 [OpenTableFormatInput](#aws-glue-api-catalog-tables-OpenTableFormatInput) 对象。

  在创建开放格式表时指定 `OpenTableFormatInput` 结构。

**响应**
+ *无响应参数。*

**错误**
+ `AlreadyExistsException`
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `ResourceNumberLimitExceededException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ConcurrentModificationException`
+ `ResourceNotReadyException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## UpdateTable 操作（Python：update\$1table）
<a name="aws-glue-api-catalog-tables-UpdateTable"></a>

更新数据目录中的元数据表。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录数据库的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `Name` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  该表在将于 AWS Glue Data Catalog 中创建的指定数据库中的唯一标识符。
+ `TableInput` – 一个 [TableInput](#aws-glue-api-catalog-tables-TableInput) 对象。

  用于定义目录中的元数据表的 `TableInput` 对象。
+ `SkipArchive` – 布尔值。

  默认情况下，`UpdateTable` 始终在更新表之前创建一个存档版本。但是，如果 `skipArchive` 设置为 true，`UpdateTable` 不创建存档的版本。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  在该 ID 处更新表内容的事务 ID。
+ `VersionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于更新表内容的版本 ID。
+ `ViewUpdateAction` – UTF-8 字符串（有效值：`ADD` \$1`REPLACE` \$1`ADD_OR_REPLACE` \$1`DROP` ）。

  更新视图时要执行的操作。
+ `Force` – 布尔值。

  一个标志，可以设置为 true 以忽略匹配的存储描述符和子对象匹配要求。
+ `UpdateOpenTableFormatInput` – 一个 [UpdateOpenTableFormatInput](#aws-glue-api-catalog-tables-UpdateOpenTableFormatInput) 对象。

  用于更新 AWS Glue Data Catalog 中开放表格式表的输入参数，作为 Apache Iceberg 等格式特定更新操作的封装器。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `ConcurrentModificationException`
+ `ResourceNumberLimitExceededException`
+ `GlueEncryptionException`
+ `ResourceNotReadyException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`
+ `AlreadyExistsException`

## DeleteTable 操作（Python：delete\$1table）
<a name="aws-glue-api-catalog-tables-DeleteTable"></a>

从数据目录中创建表定义。

**注意**  
完成此操作后，您将无法再访问属于已删除的表的表版本和分区。AWS Glue 会及时以异步方式删除这些“孤立”资源，这由服务决定。  
为了确保立即删除所有相关资源，在调用 `DeleteTable` 之前，请使用 `DeleteTableVersion` 或 `BatchDeleteTableVersion` 以及 `DeletePartition` 或 `BatchDeletePartition`，删除属于该表的所有资源。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录数据库的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的表的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  在该 ID 处删除表内容的事务 ID。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `ConcurrentModificationException`
+ `ResourceNotReadyException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## BatchDeleteTable 操作（Python：batch\$1delete\$1table）
<a name="aws-glue-api-catalog-tables-BatchDeleteTable"></a>

一次性删除多个表。

**注意**  
完成此操作后，您将无法再访问属于已删除的表的表版本和分区。AWS Glue 会及时以异步方式删除这些“孤立”资源，这由服务决定。  
为了确保立即删除所有相关资源，在调用 `BatchDeleteTable` 之前，请使用 `DeleteTableVersion` 或 `BatchDeleteTableVersion` 以及 `DeletePartition` 或 `BatchDeletePartition`，删除属于该表的所有资源。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的表所在的目录数据库的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TablesToDelete` – *必填：*UTF-8 字符串数组，不超过 100 个字符串。

  要删除的表的列表。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  在该 ID 处删除表内容的事务 ID。

**响应**
+ `Errors` – [TableError](#aws-glue-api-catalog-tables-TableError) 对象的数组。

  尝试删除指定表时遇到的错误的列表。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ResourceNotReadyException`

## GetTable 操作（Python：get\$1table）
<a name="aws-glue-api-catalog-tables-GetTable"></a>

在指定表的数据目录中检索 `Table` 定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录中的数据库的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要检索其定义的表的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  在该 ID 处读取表内容的事务 ID。
+ `QueryAsOfTime` – 时间戳。

  截至读取表内容的时间。如果未设置，将使用最近的事务提交时间。无法与 `TransactionId` 一起指定。
+ `AuditContext` – 一个 [AuditContext](#aws-glue-api-catalog-tables-AuditContext) 对象。

  包含 Lake Formation [审计上下文](https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html)的结构。
+ `IncludeStatusDetails` – 布尔值。

  指定是否包含与 AWS Glue Data Catalog 视图创建或更新请求相关的状态详细信息。

**响应**
+ `Table` – 一个 [表](#aws-glue-api-catalog-tables-Table) 对象。

  用于定义指定表的 `Table` 对象。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `ResourceNotReadyException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## GetTables 操作（Python：get\$1tables）
<a name="aws-glue-api-catalog-tables-GetTables"></a>

在给定的 `Database` 中检索部分或所有表的定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  目录中要列出其表的数据库。对于 Hive 兼容性，此名称必须是完全小写的。
+ `Expression` – UTF-8 字符串，长度不超过 2048 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  正则表达式模式。如果存在，则只返回其名称与模式匹配的表。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用，则包括)。
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  要在单个响应中返回的表的最大数量。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  在该 ID 处读取表内容的事务 ID。
+ `QueryAsOfTime` – 时间戳。

  截至读取表内容的时间。如果未设置，将使用最近的事务提交时间。无法与 `TransactionId` 一起指定。
+ `AuditContext` – 一个 [AuditContext](#aws-glue-api-catalog-tables-AuditContext) 对象。

  包含 Lake Formation [审计上下文](https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html)的结构。
+ `IncludeStatusDetails` – 布尔值。

  指定是否包含与 AWS Glue Data Catalog 视图创建或更新请求相关的状态详细信息。
+ `AttributesToGet` – UTF-8 字符串数组。

   指定 `GetTables` 调用返回的表字段。此参数不接受空列表。请求中必须包含 `NAME`。

  有效的值组合如下：
  + `NAME` – 数据库中所有表的名称。
  + `NAME`、`TABLE_TYPE` – 所有表的名称和表类型。

**响应**
+ `TableList` – [表](#aws-glue-api-catalog-tables-Table) 对象的数组。

  请求的 `Table` 对象的列表。
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果当前列表片段不是最后一个，则呈现)。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `InternalServiceException`
+ `GlueEncryptionException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## GetTableVersion 操作（Python：get\$1table\$1version）
<a name="aws-glue-api-catalog-tables-GetTableVersion"></a>

检索表的指定版本。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录中的数据库。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `VersionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要检索的表版本的 ID 值。`VersionID` 是整数的字符串表示。每个版本都会增加 1。

**响应**
+ `TableVersion` – 一个 [TableVersion](#aws-glue-api-catalog-tables-TableVersion) 对象。

  请求的表版本。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## GetTableVersions 操作（Python：get\$1table\$1versions）
<a name="aws-glue-api-catalog-tables-GetTableVersions"></a>

检索标识指定表的可用版本的字符串的列表。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录中的数据库。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这不是第一次调用)。
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  要在一个响应中返回的表版本的最大数量。

**响应**
+ `TableVersions` – [TableVersion](#aws-glue-api-catalog-tables-TableVersion) 对象的数组。

  标识指定表的可用版本的字符串的列表。
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果可用版本的列表不包括最后一个)。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## DeleteTableVersion 操作（Python：delete\$1table\$1version）
<a name="aws-glue-api-catalog-tables-DeleteTableVersion"></a>

删除表的指定版本。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录中的数据库。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `VersionId` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的表版本的 ID。`VersionID` 是整数的字符串表示。每个版本都会增加 1。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`

## BatchDeleteTableVersion 操作（Python：batch\$1delete\$1table\$1version）
<a name="aws-glue-api-catalog-tables-BatchDeleteTableVersion"></a>

删除表的版本的指定批次。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的目录中的数据库。对于 Hive 兼容性，此名称必须是完全小写的。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表的名称。对于 Hive 兼容性，此名称必须是完全小写的。
+ `VersionIds` – *必填：*UTF-8 字符串数组，不超过 100 个字符串。

  要删除版本的 ID 的列表。`VersionId` 是整数的字符串表示。每个版本都会增加 1。

**响应**
+ `Errors` – [TableVersionError](#aws-glue-api-catalog-tables-TableVersionError) 对象的数组。

  尝试删除指定表版本时遇到的错误的列表。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`

## SearchTables 操作（Python：search\$1tables）
<a name="aws-glue-api-catalog-tables-SearchTables"></a>

根据表元数据以及父数据库中的属性搜索一组表。您可以根据文本或筛选条件进行搜索。

您只能基于 Lake Formation 中定义的安全策略来获取有权访问的表。您至少需要具有该表的只读访问权才能返回该表。如果您无权访问表中的所有列，则在将表列表返回给您时，不会根据这些列进行搜索。如果您有权访问这些列，但不能访问这些列中的数据，则这些列及其关联元数据将包含在搜索中。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  唯一标识符，包含 `account_id`。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用，则包括)。
+ `Filters` – [PropertyPredicate](aws-glue-api-common.md#aws-glue-api-common-PropertyPredicate) 对象的数组。

  键值对列表以及用于筛选搜索结果的比较器。返回与谓词匹配的所有实体。

  `PropertyPredicate` 结构的 `Comparator` 成员仅用于时间字段，并且可以省略其他字段类型。此外，当比较字符串值时，例如 `Key=Name`，则使用模糊匹配算法。`Key` 字段（例如，`Name` 字段值）将拆分为某些标点符号字符，例如 -、:、\$1 等来成为令牌。然后，每个令牌都与 `PropertyPredicate` 成员的 `Value` 完全匹配。例如，如果是 `Key=Name` 和 `Value=link`，表名为 `customer-link` 并且返回 `xx-link-yy`，但不返回 `xxlinkyy`。
+ `SearchText`：值字符串，长度不少于 1 个字节，不超过 1024 个字节。

  一个用于文本搜索的字符串。

  根据与值的精确匹配在引号筛选器中指定值。
+ `SortCriteria` – [SortCriterion](#aws-glue-api-catalog-tables-SortCriterion) 对象的数组，不超过 1 个结构。

  用于按字段名称对结果进行升序或降序排序的条件的列表。
+ `MaxResults` – 数字（整数），不小于 1 或大于 1000。

  要在单个响应中返回的表的最大数量。
+ `ResourceShareType` – UTF-8 字符串（有效值：`FOREIGN` \$1`ALL` \$1`FEDERATED` ）。

  允许您指定要搜索与您的账户共享的表。允许的值是 `FOREIGN` 或 `ALL`。
  + 如果设置为 `FOREIGN`，将搜索与您的账户共享的表。
  + 如果设置为 `ALL`，将列出与您的账户共享的表，以及本账户中的表。
+ `IncludeStatusDetails` – 布尔值。

  指定是否包含与 AWS Glue Data Catalog 视图创建或更新请求相关的状态详细信息。

**响应**
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果当前列表片段不是最后一个，则呈现)。
+ `TableList` – [表](#aws-glue-api-catalog-tables-Table) 对象的数组。

  请求的 `Table` 对象的列表。`SearchTables` 响应仅返回您有权访问的表。

**错误**
+ `InternalServiceException`
+ `InvalidInputException`
+ `OperationTimeoutException`

## GetPartitionIndexes 操作（Python：get\$1partition\$1indexes）
<a name="aws-glue-api-catalog-tables-GetPartitionIndexes"></a>

检索与表关联的分区索引。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  指定要从中检索分区索引的数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  指定要为其检索分区索引的表的名称。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用，则包括)。

**响应**
+ `PartitionIndexDescriptorList` – [PartitionIndexDescriptor](#aws-glue-api-catalog-tables-PartitionIndexDescriptor) 对象的数组。

  索引描述符的列表。
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果当前列表片段不是最后一个，则呈现)。

**错误**
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `ConflictException`

## CreatePartitionIndex 操作（Python：create\$1partition\$1index）
<a name="aws-glue-api-catalog-tables-CreatePartitionIndex"></a>

在现有表中创建指定的分区索引。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  指定要创建分区索引的数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  指定要创建分区索引的表的名称。
+ `PartitionIndex` – *必填：*一个 [PartitionIndex](#aws-glue-api-catalog-tables-PartitionIndex) 对象。

  指定 `PartitionIndex` 结构在现有表中创建分区索引。

**响应**
+ *无响应参数。*

**错误**
+ `AlreadyExistsException`
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `ResourceNumberLimitExceededException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## DeletePartitionIndex 操作（Python：delete\$1partition\$1index）
<a name="aws-glue-api-catalog-tables-DeletePartitionIndex"></a>

在现有表中删除指定的分区索引。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  表所在的数据目录的 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  指定要从中删除分区索引的数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  指定要从中删除分区索引的表的名称。
+ `IndexName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的分区索引的名称。

**响应**
+ *无响应参数。*

**错误**
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `ConflictException`
+ `GlueEncryptionException`

## GetColumnStatisticsForTable 操作（Python：get\$1column\$1statistics\$1for\$1table）
<a name="aws-glue-api-catalog-tables-GetColumnStatisticsForTable"></a>

检索列的表统计数据信息。

此操作所需的 Identity and Access Management（IAM）权限是 `GetTable`。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `ColumnNames` – *必填：*UTF-8 字符串数组，不超过 100 个字符串。

  列名称的列表。

**响应**
+ `ColumnStatisticsList` – [ColumnStatistics](aws-glue-api-common.md#aws-glue-api-common-ColumnStatistics) 对象的数组。

  列统计数据列表。
+ `Errors` – [ColumnError](aws-glue-api-common.md#aws-glue-api-common-ColumnError) 对象的数组。

  检索失败的 ColumnStatistics 的列表。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## UpdateColumnStatisticsForTable 操作（Python：update\$1column\$1statistics\$1for\$1table）
<a name="aws-glue-api-catalog-tables-UpdateColumnStatisticsForTable"></a>

创建或更新列的表统计数据信息。

此操作所需的 Identity and Access Management（IAM）权限是 `UpdateTable`。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `ColumnStatisticsList` – *必填：*[ColumnStatistics](aws-glue-api-common.md#aws-glue-api-common-ColumnStatistics) 对象的数组，不超过 25 个结构。

  列统计数据的列表。

**响应**
+ `Errors` – [ColumnStatisticsError](aws-glue-api-common.md#aws-glue-api-common-ColumnStatisticsError) 对象的数组。

  ColumnStatisticsErrors 的列表。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## DeleteColumnStatisticsForTable 操作（Python：delete\$1column\$1statistics\$1for\$1table）
<a name="aws-glue-api-catalog-tables-DeleteColumnStatisticsForTable"></a>

检索列的表统计数据信息。

此操作所需的 Identity and Access Management（IAM）权限是 `DeleteTable`。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `ColumnName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  列的名称。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

# 分区 API
<a name="aws-glue-api-catalog-partitions"></a>

分区 API 介绍用于处理分区的数据类型和操作。

## 数据类型
<a name="aws-glue-api-catalog-partitions-objects"></a>
+ [Partition 结构](#aws-glue-api-catalog-partitions-Partition)
+ [PartitionInput 结构](#aws-glue-api-catalog-partitions-PartitionInput)
+ [PartitionSpecWithSharedStorageDescriptor 结构](#aws-glue-api-catalog-partitions-PartitionSpecWithSharedStorageDescriptor)
+ [PartitionListComposingSpec 结构](#aws-glue-api-catalog-partitions-PartitionListComposingSpec)
+ [PartitionSpecProxy 结构](#aws-glue-api-catalog-partitions-PartitionSpecProxy)
+ [PartitionValueList 结构](#aws-glue-api-catalog-partitions-PartitionValueList)
+ [Segment 结构](#aws-glue-api-catalog-partitions-Segment)
+ [PartitionError 结构](#aws-glue-api-catalog-partitions-PartitionError)
+ [BatchUpdatePartitionFailureEntry 结构](#aws-glue-api-catalog-partitions-BatchUpdatePartitionFailureEntry)
+ [BatchUpdatePartitionRequestEntry 结构](#aws-glue-api-catalog-partitions-BatchUpdatePartitionRequestEntry)
+ [StorageDescriptor 结构](#aws-glue-api-catalog-partitions-StorageDescriptor)
+ [SchemaReference 结构](#aws-glue-api-catalog-partitions-SchemaReference)
+ [SerDeInfo 结构](#aws-glue-api-catalog-partitions-SerDeInfo)
+ [SkewedInfo 结构](#aws-glue-api-catalog-partitions-SkewedInfo)

## Partition 结构
<a name="aws-glue-api-catalog-partitions-Partition"></a>

表示表数据的一部分。

**Fields**
+ `Values` – UTF-8 字符串数组。

  分区的值。
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的目录数据库的名称。
+ `TableName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的数据库表的名称。
+ `CreationTime` – 时间戳。

  创建分区的时间。
+ `LastAccessTime` – 时间戳。

  上次访问分区的时间。
+ `StorageDescriptor` – 一个 [StorageDescriptor](#aws-glue-api-catalog-partitions-StorageDescriptor) 对象。

  提供有关存储分区的物理位置的信息。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对用于定义分区参数。
+ `LastAnalyzedTime` – 时间戳。

  上次为该分区计算列统计信息的时间。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的数据目录的 ID。

## PartitionInput 结构
<a name="aws-glue-api-catalog-partitions-PartitionInput"></a>

用于创建和更新分区的结构。

**Fields**
+ `Values` – UTF-8 字符串数组。

  分区的值。尽管开发工具包不需要此参数，但您必须为有效输入指定此参数。

  新分区的键值必须作为字符串对象数组传递，这些对象的顺序必须与 Amazon S3 前缀中出现的分区键的顺序相同。否则，AWS Glue 会将值添加到错误的键。
+ `LastAccessTime` – 时间戳。

  上次访问分区的时间。
+ `StorageDescriptor` – 一个 [StorageDescriptor](#aws-glue-api-catalog-partitions-StorageDescriptor) 对象。

  提供有关存储分区的物理位置的信息。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对用于定义分区参数。
+ `LastAnalyzedTime` – 时间戳。

  上次为该分区计算列统计信息的时间。

## PartitionSpecWithSharedStorageDescriptor 结构
<a name="aws-glue-api-catalog-partitions-PartitionSpecWithSharedStorageDescriptor"></a>

共享物理位置的分区的分区规范。

**Fields**
+ `StorageDescriptor` – 一个 [StorageDescriptor](#aws-glue-api-catalog-partitions-StorageDescriptor) 对象。

  共享的物理存储信息。
+ `Partitions` – [分区](#aws-glue-api-catalog-partitions-Partition) 对象的数组。

  共享该物理位置的分区的列表。

## PartitionListComposingSpec 结构
<a name="aws-glue-api-catalog-partitions-PartitionListComposingSpec"></a>

列出相关的分区。

**Fields**
+ `Partitions` – [分区](#aws-glue-api-catalog-partitions-Partition) 对象的数组。

  编制规范中的分区的列表。

## PartitionSpecProxy 结构
<a name="aws-glue-api-catalog-partitions-PartitionSpecProxy"></a>

提供指定分区的根路径。

**Fields**
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库。
+ `TableName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含分区的表的名称。
+ `RootPath` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  用于寻址分区的代理的根路径。
+ `PartitionSpecWithSharedSD` – 一个 [PartitionSpecWithSharedStorageDescriptor](#aws-glue-api-catalog-partitions-PartitionSpecWithSharedStorageDescriptor) 对象。

  共享同一物理存储位置的分区的规范。
+ `PartitionListComposingSpec` – 一个 [PartitionListComposingSpec](#aws-glue-api-catalog-partitions-PartitionListComposingSpec) 对象。

  指定分区的列表。

## PartitionValueList 结构
<a name="aws-glue-api-catalog-partitions-PartitionValueList"></a>

包含定义分区的值的列表。

**Fields**
+ `Values` – *必填*：UTF-8 字符串数组。

  值的列表。

## Segment 结构
<a name="aws-glue-api-catalog-partitions-Segment"></a>

定义表分区的非重叠区域，从而允许并行运行多个请求。

**Fields**
+ `SegmentNumber` – *必填：*数字（整数），至多为“无”。

  此片段的从零开始的索引编号。例如，如果片段的总数为 4，则 `SegmentNumber` 值的范围为 0 到 3 。
+ `TotalSegments` – *必填：*数字（整数），不小于 1 或大于 10。

  片段总数。

## PartitionError 结构
<a name="aws-glue-api-catalog-partitions-PartitionError"></a>

包含有关分区错误的信息。

**Fields**
+ `PartitionValues` – UTF-8 字符串数组。

  用于定义分区的值。
+ `ErrorDetail` – 一个 [ErrorDetail](aws-glue-api-common.md#aws-glue-api-common-ErrorDetail) 对象。

  有关分区错误的详细信息。

## BatchUpdatePartitionFailureEntry 结构
<a name="aws-glue-api-catalog-partitions-BatchUpdatePartitionFailureEntry"></a>

包含有关批量更新分区错误的信息。

**Fields**
+ `PartitionValueList` – UTF-8 字符串数组，不超过 100 个字符串。

  用于定义分区的值的列表。
+ `ErrorDetail` – 一个 [ErrorDetail](aws-glue-api-common.md#aws-glue-api-common-ErrorDetail) 对象。

  有关批量更新分区错误的详细信息。

## BatchUpdatePartitionRequestEntry 结构
<a name="aws-glue-api-catalog-partitions-BatchUpdatePartitionRequestEntry"></a>

该结构包含用于更新分区的值和结构。

**Fields**
+ `PartitionValueList` – *必填：*UTF-8 字符串数组，不超过 100 个字符串。

  用于定义分区的值的列表。
+ `PartitionInput` – *必填：*一个 [PartitionInput](#aws-glue-api-catalog-partitions-PartitionInput) 对象。

  用于更新分区的结构。

## StorageDescriptor 结构
<a name="aws-glue-api-catalog-partitions-StorageDescriptor"></a>

描述表数据的物理存储。

**Fields**
+ `Columns` – [列](aws-glue-api-catalog-tables.md#aws-glue-api-catalog-tables-Column) 对象的数组。

  表中的 `Columns` 的列表。
+ `Location` – 位置字符串，不超过 2056 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  表的物理位置。默认情况下，它采用仓库位置的形式，后跟仓库中的数据库位置，然后是表名称。
+ `AdditionalLocations` – UTF-8 字符串数组。

  指向 Delta 表所在路径的位置列表。
+ `InputFormat` – 格式字符串，不超过 128 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  输入格式：`SequenceFileInputFormat`（二进制）或 `TextInputFormat` 或自定义格式。
+ `OutputFormat` – 格式字符串，不超过 128 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  输出格式：`SequenceFileOutputFormat`（二进制）、`IgnoreKeyTextOutputFormat` 或自定义格式。
+ `Compressed` – 布尔值。

  如果对表中的数据进行压缩，则为 `True`，否则为 `False`。
+ `NumberOfBuckets` – 数字（整数）。

  如果表包含任何维度列，则必须指定。
+ `SerdeInfo` – 一个 [SerDeInfo](#aws-glue-api-catalog-partitions-SerDeInfo) 对象。

  序列化/反序列化（SerDe）信息。
+ `BucketColumns` – UTF-8 字符串数组。

  表中的 Reducer 分组列、集群列以及桶列的列表。
+ `SortColumns` – [顺序](aws-glue-api-catalog-tables.md#aws-glue-api-catalog-tables-Order) 对象的数组。

  指定表中的每个桶的排序顺序的列表。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  使用键/值形式的用户提供的属性。
+ `SkewedInfo` – 一个 [SkewedInfo](#aws-glue-api-catalog-partitions-SkewedInfo) 对象。

  有关在列中经常出现的值（偏斜值）的信息。
+ `StoredAsSubDirectories` – 布尔值。

  如果表数据存储在子目录中，则为 `True`，否则为 `False`。
+ `SchemaReference` – 一个 [SchemaReference](#aws-glue-api-catalog-partitions-SchemaReference) 对象。

  引用存储在 AWS Glue 架构注册表中的架构的对象。

  创建表时，可以为架构传递列的空列表，而使用架构引用。

## SchemaReference 结构
<a name="aws-glue-api-catalog-partitions-SchemaReference"></a>

引用存储在 AWS Glue 架构注册表中的架构的对象。

**Fields**
+ `SchemaId` – 一个 [SchemaId](aws-glue-api-schema-registry-api.md#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的结构。必须提供此值或 `SchemaVersionId`。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  分配给架构版本的唯一 ID。必须提供此值或 `SchemaId`。
+ `SchemaVersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。

## SerDeInfo 结构
<a name="aws-glue-api-catalog-partitions-SerDeInfo"></a>

有关序列化/反序列化程序（SerDe）的信息，它用作抽取器和加载器。

**Fields**
+ `Name` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  SerDe 的名称。
+ `SerializationLibrary` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  通常是实现 SerDe 的类。例如，`org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe`。
+ `Parameters` – 键值对的映射数组。

  每个键是一个键字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值是一个 UTF-8 字符串，不超过 512000 个字节。

  这些键值对用于定义 SerDe 的初始化参数。

## SkewedInfo 结构
<a name="aws-glue-api-catalog-partitions-SkewedInfo"></a>

指定表中的偏斜值。偏斜值是指出现频率很高的值。

**Fields**
+ `SkewedColumnNames` – UTF-8 字符串数组。

  包含偏斜值的列名称的列表。
+ `SkewedColumnValues` – UTF-8 字符串数组。

  经常被认为是偏斜的值的列表。
+ `SkewedColumnValueLocationMaps` – 键值对的映射数组。

  每个键是一个 UTF-8 字符串。

  每个值是一个 UTF-8 字符串。

  偏斜值到包含它们的列的映射。

## 操作
<a name="aws-glue-api-catalog-partitions-actions"></a>
+ [CreatePartition 操作（Python：create\$1partition）](#aws-glue-api-catalog-partitions-CreatePartition)
+ [BatchCreatePartition 操作（Python：batch\$1create\$1partition）](#aws-glue-api-catalog-partitions-BatchCreatePartition)
+ [UpdatePartition 操作（Python：update\$1partition）](#aws-glue-api-catalog-partitions-UpdatePartition)
+ [DeletePartition 操作（Python：delete\$1partition）](#aws-glue-api-catalog-partitions-DeletePartition)
+ [BatchDeletePartition 操作（Python：batch\$1delete\$1partition）](#aws-glue-api-catalog-partitions-BatchDeletePartition)
+ [GetPartition 操作（Python：get\$1partition）](#aws-glue-api-catalog-partitions-GetPartition)
+ [GetPartitions 操作（Python：get\$1partitions）](#aws-glue-api-catalog-partitions-GetPartitions)
+ [BatchGetPartition 操作（Python：batch\$1get\$1partition）](#aws-glue-api-catalog-partitions-BatchGetPartition)
+ [BatchUpdatePartition 操作（Python：batch\$1update\$1partition）](#aws-glue-api-catalog-partitions-BatchUpdatePartition)
+ [GetColumnStatisticsForPartition 操作（Python：get\$1column\$1statistics\$1for\$1partition）](#aws-glue-api-catalog-partitions-GetColumnStatisticsForPartition)
+ [UpdateColumnStatisticsForPartition 操作（Python：update\$1column\$1statistics\$1for\$1partition）](#aws-glue-api-catalog-partitions-UpdateColumnStatisticsForPartition)
+ [DeleteColumnStatisticsForPartition 操作（Python：delete\$1column\$1statistics\$1for\$1partition）](#aws-glue-api-catalog-partitions-DeleteColumnStatisticsForPartition)

## CreatePartition 操作（Python：create\$1partition）
<a name="aws-glue-api-catalog-partitions-CreatePartition"></a>

创建新的分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的目录的 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的元数据数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的元数据表的名称。
+ `PartitionInput` – *必填：*一个 [PartitionInput](#aws-glue-api-catalog-partitions-PartitionInput) 对象。

  一个用于定义要创建的分区的 `PartitionInput` 结构。

**响应**
+ *无响应参数。*

**错误**
+ `InvalidInputException`
+ `AlreadyExistsException`
+ `ResourceNumberLimitExceededException`
+ `InternalServiceException`
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## BatchCreatePartition 操作（Python：batch\$1create\$1partition）
<a name="aws-glue-api-catalog-partitions-BatchCreatePartition"></a>

在批量操作中创建一个或多个分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的目录的 ID。目前，它应该为 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的元数据数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建分区的元数据表的名称。
+ `PartitionInputList` – *必填：*[PartitionInput](#aws-glue-api-catalog-partitions-PartitionInput) 对象的数组，不超过 100 个结构。

  用于定义要创建的分区的 `PartitionInput` 结构的列表。

**响应**
+ `Errors` – [PartitionError](#aws-glue-api-catalog-partitions-PartitionError) 对象的数组。

  在尝试创建请求的分区时遇到错误。

**错误**
+ `InvalidInputException`
+ `AlreadyExistsException`
+ `ResourceNumberLimitExceededException`
+ `InternalServiceException`
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## UpdatePartition 操作（Python：update\$1partition）
<a name="aws-glue-api-catalog-partitions-UpdatePartition"></a>

更新分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要更新的分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉表所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要更新的分区所在的表的名称。
+ `PartitionValueList` – *必填：*UTF-8 字符串数组，不超过 100 个字符串。

  用于定义分区更新的分区键值的列表。
+ `PartitionInput` – *必填：*一个 [PartitionInput](#aws-glue-api-catalog-partitions-PartitionInput) 对象。

  要将分区更新到的新分区对象。

  此 `Values` 属性无法更改。如果要更改分区的分区键值，请删除并重新创建分区。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## DeletePartition 操作（Python：delete\$1partition）
<a name="aws-glue-api-catalog-partitions-DeletePartition"></a>

删除指定的分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉表所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含要删除的分区的表的名称。
+ `PartitionValues` – *必填*：UTF-8 字符串数组。

  用于定义分区的值。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`

## BatchDeletePartition 操作（Python：batch\$1delete\$1partition）
<a name="aws-glue-api-catalog-partitions-BatchDeletePartition"></a>

在批量操作中删除一个或多个分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉表所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含要删除的分区的表的名称。
+ `PartitionsToDelete` – *必填：*[PartitionValueList](#aws-glue-api-catalog-partitions-PartitionValueList) 对象的数组，不超过 25 个结构。

  用于定义要删除的分区的 `PartitionInput` 结构的列表。

**响应**
+ `Errors` – [PartitionError](#aws-glue-api-catalog-partitions-PartitionError) 对象的数组。

  在尝试删除请求的分区时遇到错误。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `InternalServiceException`
+ `OperationTimeoutException`

## GetPartition 操作（Python：get\$1partition）
<a name="aws-glue-api-catalog-partitions-GetPartition"></a>

检索有关指定分区的信息。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `PartitionValues` – *必填*：UTF-8 字符串数组。

  用于定义分区的值。

**响应**
+ `Partition` – 一个 [分区](#aws-glue-api-catalog-partitions-Partition) 对象。

  请求的信息，采用 `Partition` 对象的形式。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## GetPartitions 操作（Python：get\$1partitions）
<a name="aws-glue-api-catalog-partitions-GetPartitions"></a>

检索有关表中的分区的信息。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `Expression` – 谓词字符串，不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  筛选要返回的分区的表达式。

  该表达式使用类似于 SQL `WHERE` 筛选条件子句的 SQL 语法。SQL 语句解析器 [JSQLParser](http://jsqlparser.sourceforge.net/home.php) 可解析表达式。

  *运算符*：以下是您可以在 `Expression` API 调用中使用的运算符：  
=  
检查两个操作数的值是否相等；如果是，则条件成立。  
示例：假设“变量 a”保持 10，“变量 b”保持 20。  
(a = b) 不成立。  
< >  
检查两个操作数的值是否相等；如果值不相等，则条件成立。  
示例：(a < > b) 成立。  
>  
检查左操作数的值是否大于右操作数的值；如果是，则条件成立。  
示例：(a > b) 不成立。  
<  
检查左操作数的值是否小于右操作数的值；如果是，则条件成立。  
示例：(a < b) 成立。  
>=  
检查左操作数的值是否大于或等于右操作数的值；如果是，则条件成立。  
示例：(a >= b) 不成立。  
<=  
检查左操作数的值是否小于或等于右操作数的值；如果是，则条件成立。  
示例：(a <= b) 成立。  
AND、OR、IN、BETWEEN、LIKE、NOT、IS NULL  
逻辑运算符。

  *支持的分区键类型*：以下是受支持的分区键。
  + `string`
  + `date`
  + `timestamp`
  + `int`
  + `bigint`
  + `long`
  + `tinyint`
  + `smallint`
  + `decimal`

  如果遇到无效类型，则会引发异常。

  以下列表显示了每种类型的有效运算符。定义爬网程序时，`partitionKey` 类型将创建为 `STRING`，以与目录分区兼容。

  *示例 API 调用*：  
**Example**  

  表 `twitter_partition` 有三个分区：

  ```
  year = 2015
          year = 2016
          year = 2017
  ```  
**Example**  

  获取 `year` 等于 2015 的分区

  ```
  aws glue get-partitions --database-name dbname --table-name twitter_partition 
          --expression "year*=*'2015'"
  ```  
**Example**  

  获取 `year` 2016 至 2018 （不含）之间的分区

  ```
  aws glue get-partitions --database-name dbname --table-name twitter_partition 
          --expression "year>'2016' AND year<'2018'"
  ```  
**Example**  

  获取 `year` 2015 至 2018（含）之间的分区 以下 API 调用彼此等效：

  ```
  aws glue get-partitions --database-name dbname --table-name twitter_partition 
          --expression "year>='2015' AND year<='2018'"
          
          aws glue get-partitions --database-name dbname --table-name twitter_partition 
          --expression "year BETWEEN 2015 AND 2018"
          
          aws glue get-partitions --database-name dbname --table-name twitter_partition 
          --expression "year IN (2015,2016,2017,2018)"
  ```  
**Example**  

  通配符分区筛选条件，其中以下调用输出为分区年份=2017。`LIKE` 中不支持正则表达式。

  ```
  aws glue get-partitions --database-name dbname --table-name twitter_partition 
          --expression "year LIKE '%7'"
  ```
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果这不是检索这些分区的第一个调用)。
+ `Segment` – 一个 [客户细分](#aws-glue-api-catalog-partitions-Segment) 对象。

  要在该请求中扫描的表的片段。
+ `MaxResults` – 数字（整数），不小于 1 或大于 1000。

  要在单个响应中返回的最大分区数。
+ `ExcludeColumnSchema` – 布尔值。

  如果为真，则指定不返回分区列架构。当您只对分区值或位置等其他分区属性感兴趣时很有用。这种方法通过不返回重复数据来避免大型响应的问题。
+ `TransactionId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #44](aws-glue-api-common.md#regex_44) 匹配。

  在该 ID 处读取分区内容的事务 ID。
+ `QueryAsOfTime` – 时间戳。

  截至读取分区内容的时间。如果未设置，将使用最近的事务提交时间。无法与 `TransactionId` 一起指定。

**响应**
+ `Partitions` – [分区](#aws-glue-api-catalog-partitions-Partition) 对象的数组。

  请求的分区的列表。
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果返回的分区列表不包括最后一个)。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `InternalServiceException`
+ `GlueEncryptionException`
+ `InvalidStateException`
+ `ResourceNotReadyException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## BatchGetPartition 操作（Python：batch\$1get\$1partition）
<a name="aws-glue-api-catalog-partitions-BatchGetPartition"></a>

在批处理请求中检索分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `PartitionsToGet` – *必填：*[PartitionValueList](#aws-glue-api-catalog-partitions-PartitionValueList) 对象的数组，不超过 1000 个结构。

  用于标识要检索的分区的分区值的列表。

**响应**
+ `Partitions` – [分区](#aws-glue-api-catalog-partitions-Partition) 对象的数组。

  请求的分区的列表。
+ `UnprocessedKeys` – [PartitionValueList](#aws-glue-api-catalog-partitions-PartitionValueList) 对象数组，不超过 1000 个结构。

  请求中未返回分区的分区值的列表。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InternalServiceException`
+ `GlueEncryptionException`
+ `InvalidStateException`
+ `FederationSourceException`
+ `FederationSourceRetryableException`

## BatchUpdatePartition 操作（Python：batch\$1update\$1partition）
<a name="aws-glue-api-catalog-partitions-BatchUpdatePartition"></a>

在分批操作中更新一个或多个分区。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中更新分区的目录的 ID。目前，它应该为 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中更新分区的元数据数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中更新分区的元数据表的名称。
+ `Entries` – *必填*：[BatchUpdatePartitionRequestEntry](#aws-glue-api-catalog-partitions-BatchUpdatePartitionRequestEntry)对象的数组，不少于 1 个或不超过 100 个结构。

  最多 100 个 `BatchUpdatePartitionRequestEntry` 对象进行更新的列表。

**响应**
+ `Errors` – [BatchUpdatePartitionFailureEntry](#aws-glue-api-catalog-partitions-BatchUpdatePartitionFailureEntry) 对象的数组。

  在尝试更新请求的分区时遇到错误。`BatchUpdatePartitionFailureEntry` 对象的列表。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InternalServiceException`
+ `GlueEncryptionException`

## GetColumnStatisticsForPartition 操作（Python：get\$1column\$1statistics\$1for\$1partition）
<a name="aws-glue-api-catalog-partitions-GetColumnStatisticsForPartition"></a>

检索列的分区统计数据信息。

此操作所需的 Identity and Access Management（IAM）权限是 `GetPartition`。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `PartitionValues` – *必填*：UTF-8 字符串数组。

  用于标识分区的分区值的列表。
+ `ColumnNames` – *必填：*UTF-8 字符串数组，不超过 100 个字符串。

  列名称的列表。

**响应**
+ `ColumnStatisticsList` – [ColumnStatistics](aws-glue-api-common.md#aws-glue-api-common-ColumnStatistics) 对象的数组。

  检索失败的 ColumnStatistics 的列表。
+ `Errors` – [ColumnError](aws-glue-api-common.md#aws-glue-api-common-ColumnError) 对象的数组。

  检索列统计数据时出错。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## UpdateColumnStatisticsForPartition 操作（Python：update\$1column\$1statistics\$1for\$1partition）
<a name="aws-glue-api-catalog-partitions-UpdateColumnStatisticsForPartition"></a>

创建或更新分区统计数据列信息。

此操作所需的 Identity and Access Management（IAM）权限是 `UpdatePartition`。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `PartitionValues` – *必填*：UTF-8 字符串数组。

  用于标识分区的分区值的列表。
+ `ColumnStatisticsList` – *必填：*[ColumnStatistics](aws-glue-api-common.md#aws-glue-api-common-ColumnStatistics) 对象的数组，不超过 25 个结构。

  列统计数据的列表。

**响应**
+ `Errors` – [ColumnStatisticsError](aws-glue-api-common.md#aws-glue-api-common-ColumnStatisticsError) 对象的数组。

  更新列统计数据时出错。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## DeleteColumnStatisticsForPartition 操作（Python：delete\$1column\$1statistics\$1for\$1partition）
<a name="aws-glue-api-catalog-partitions-DeleteColumnStatisticsForPartition"></a>

删除列的分区列统计数据信息。

此操作所需的 Identity and Access Management（IAM）权限是 `DeletePartition`。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  所涉分区所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区所在的目录数据库的名称。
+ `TableName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  分区的表的名称。
+ `PartitionValues` – *必填*：UTF-8 字符串数组。

  用于标识分区的分区值的列表。
+ `ColumnName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  列的名称。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

# 连接 API
<a name="aws-glue-api-catalog-connections"></a>

连接 API 描述了与使用 AWS Glue 中的连接相关的数据类型和 API。

**Topics**
+ [连接 API](aws-glue-api-catalog-connections-connections.md)
+ [连接类型 API](aws-glue-api-catalog-connections-connections-type.md)
+ [连接元数据和预览 API](aws-glue-api-catalog-connections-connections-metadata.md)

# 连接 API
<a name="aws-glue-api-catalog-connections-connections"></a>

连接 API 介绍 AWS Glue 连接数据类型，以及用于创建、删除、更新和列出连接的 API。

## 数据类型
<a name="aws-glue-api-catalog-connections-connections-objects"></a>
+ [Connection 结构](#aws-glue-api-catalog-connections-connections-Connection)
+ [ConnectionInput 结构](#aws-glue-api-catalog-connections-connections-ConnectionInput)
+ [TestConnectionInput 结构](#aws-glue-api-catalog-connections-connections-TestConnectionInput)
+ [PhysicalConnectionRequirements 结构](#aws-glue-api-catalog-connections-connections-PhysicalConnectionRequirements)
+ [GetConnectionsFilter 结构](#aws-glue-api-catalog-connections-connections-GetConnectionsFilter)
+ [AuthenticationConfiguration 结构](#aws-glue-api-catalog-connections-connections-AuthenticationConfiguration)
+ [AuthenticationConfigurationInput 结构](#aws-glue-api-catalog-connections-connections-AuthenticationConfigurationInput)
+ [OAuth2Properties 结构](#aws-glue-api-catalog-connections-connections-OAuth2Properties)
+ [OAuth2PropertiesInput 结构](#aws-glue-api-catalog-connections-connections-OAuth2PropertiesInput)
+ [OAuth2ClientApplication 结构](#aws-glue-api-catalog-connections-connections-OAuth2ClientApplication)
+ [AuthorizationCodeProperties 结构](#aws-glue-api-catalog-connections-connections-AuthorizationCodeProperties)
+ [BasicAuthenticationCredentials 结构](#aws-glue-api-catalog-connections-connections-BasicAuthenticationCredentials)
+ [OAuth2Credentials 结构](#aws-glue-api-catalog-connections-connections-OAuth2Credentials)

## Connection 结构
<a name="aws-glue-api-catalog-connections-connections-Connection"></a>

定义与数据源的连接。

**Fields**
+ `Name` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接定义的名称。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  连接的描述。
+ `ConnectionType` – UTF-8 字符串（有效值：`JDBC` \$1 `SFTP` \$1 `MONGODB` \$1 `KAFKA` \$1 `NETWORK` \$1 `MARKETPLACE` \$1 `CUSTOM` \$1 `SALESFORCE` \$1 `VIEW_VALIDATION_REDSHIFT` \$1 `VIEW_VALIDATION_ATHENA` \$1 `GOOGLEADS` \$1 `GOOGLESHEETS` \$1 `GOOGLEANALYTICS4` \$1 `SERVICENOW` \$1 `MARKETO` \$1 `SAPODATA` \$1 `ZENDESK` \$1 `JIRACLOUD` \$1 `NETSUITEERP` \$1 `HUBSPOT` \$1 `FACEBOOKADS` \$1 `INSTAGRAMADS` \$1 `ZOHOCRM` \$1 `SALESFORCEPARDOT` \$1 `SALESFORCEMARKETINGCLOUD` \$1 `ADOBEANALYTICS` \$1 `SLACK` \$1 `LINKEDIN` \$1 `MIXPANEL` \$1 `ASANA` \$1 `STRIPE` \$1 `SMARTSHEET` \$1 `DATADOG` \$1 `WOOCOMMERCE` \$1 `INTERCOM` \$1 `SNAPCHATADS` \$1 `PAYPAL` \$1 `QUICKBOOKS` \$1 `FACEBOOKPAGEINSIGHTS` \$1 `FRESHDESK` \$1 `TWILIO` \$1 `DOCUSIGNMONITOR` \$1 `FRESHSALES` \$1 `ZOOM` \$1 `GOOGLESEARCHCONSOLE` \$1 `SALESFORCECOMMERCECLOUD` \$1 `SAPCONCUR` \$1 `DYNATRACE` \$1 `MICROSOFTDYNAMIC365FINANCEANDOPS` \$1 `MICROSOFTTEAMS` \$1 `BLACKBAUDRAISEREDGENXT` \$1 `MAILCHIMP` \$1 `GITLAB` \$1 `PENDO` \$1 `PRODUCTBOARD` \$1 `CIRCLECI` \$1 `PIPEDIVE` \$1 `SENDGRID` \$1 `AZURECOSMOS` \$1 `AZURESQL` \$1 `BIGQUERY` \$1 `BLACKBAUD` \$1 `CLOUDERAHIVE` \$1 `CLOUDERAIMPALA` \$1 `CLOUDWATCH` \$1 `CLOUDWATCHMETRICS` \$1 `CMDB` \$1 `DATALAKEGEN2` \$1 `DB2` \$1 `DB2AS400` \$1 `DOCUMENTDB` \$1 `DOMO` \$1 `DYNAMODB` \$1 `GOOGLECLOUDSTORAGE` \$1 `HBASE` \$1 `KUSTOMER` \$1 `MICROSOFTDYNAMICS365CRM` \$1 `MONDAY` \$1 `MYSQL` \$1 `OKTA` \$1 `OPENSEARCH` \$1 `ORACLE` \$1 `PIPEDRIVE` \$1 `POSTGRESQL` \$1 `SAPHANA` \$1 `SQLSERVER` \$1 `SYNAPSE` \$1 `TERADATA` \$1 `TERADATANOS` \$1 `TIMESTREAM` \$1 `TPCDS` \$1 `VERTICA`）。

  连接的类型。目前不支持 SFTP。
+ `MatchCriteria` – UTF-8 字符串数组，不超过 10 个字符串。

  可用于选择此连接的条件的列表。
+ `ConnectionProperties` – 键值对的映射数组，不超过 100 对。

  每个键都是一个 UTF-8 字符串（有效值：`HOST` \$1 `PORT` \$1 `USERNAME="USER_NAME"` \$1 `PASSWORD` \$1 `ENCRYPTED_PASSWORD` \$1 `JDBC_DRIVER_JAR_URI` \$1 `JDBC_DRIVER_CLASS_NAME` \$1 `JDBC_ENGINE` \$1 `JDBC_ENGINE_VERSION` \$1 `CONFIG_FILES` \$1 `INSTANCE_ID` \$1 `JDBC_CONNECTION_URL` \$1 `JDBC_ENFORCE_SSL` \$1 `CUSTOM_JDBC_CERT` \$1 `SKIP_CUSTOM_JDBC_CERT_VALIDATION` \$1 `CUSTOM_JDBC_CERT_STRING` \$1 `CONNECTION_URL` \$1 `KAFKA_BOOTSTRAP_SERVERS` \$1 `KAFKA_SSL_ENABLED` \$1 `KAFKA_CUSTOM_CERT` \$1 `KAFKA_SKIP_CUSTOM_CERT_VALIDATION` \$1 `KAFKA_CLIENT_KEYSTORE` \$1 `KAFKA_CLIENT_KEYSTORE_PASSWORD` \$1 `KAFKA_CLIENT_KEY_PASSWORD` \$1 `ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD` \$1 `ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD` \$1 `KAFKA_SASL_MECHANISM` \$1 `KAFKA_SASL_PLAIN_USERNAME` \$1 `KAFKA_SASL_PLAIN_PASSWORD` \$1 `ENCRYPTED_KAFKA_SASL_PLAIN_PASSWORD` \$1 `KAFKA_SASL_SCRAM_USERNAME` \$1 `KAFKA_SASL_SCRAM_PASSWORD` \$1 `KAFKA_SASL_SCRAM_SECRETS_ARN` \$1 `ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD` \$1 `KAFKA_SASL_GSSAPI_KEYTAB` \$1 `KAFKA_SASL_GSSAPI_KRB5_CONF` \$1 `KAFKA_SASL_GSSAPI_SERVICE` \$1 `KAFKA_SASL_GSSAPI_PRINCIPAL` \$1 `SECRET_ID` \$1 `CONNECTOR_URL` \$1 `CONNECTOR_TYPE` \$1 `CONNECTOR_CLASS_NAME` \$1 `ENDPOINT` \$1 `ENDPOINT_TYPE` \$1 `ROLE_ARN` \$1 `REGION` \$1 `WORKGROUP_NAME` \$1 `CLUSTER_IDENTIFIER` \$1 `DATABASE`）。

  每个值都是一个值字符串，长度不少于 1 个字节，不超过 1024 个字节。

  这些键值对定义使用版本 1 连接架构时的连接参数：
  + `HOST`- 主机 URI：完全限定域名 (FQDN) 或数据库主机的 IPv4 地址。
  + `PORT`- 端口的端口号，介于 1024 和 65535 之间，数据库主机在这些端口上侦听数据库连接。
  + `USER_NAME`- 登录数据库时使用的名称。`USER_NAME` 的值字符串为“`USERNAME`”。
  + `PASSWORD`- 用户名使用的密码（如果使用的话）。
  + `ENCRYPTED_PASSWORD` - 通过在数据目录加密设置中设置 `ConnectionPasswordEncryption` 来启用连接密码保护时，此字段会存储加密的密码。
  + `JDBC_DRIVER_JAR_URI` - 包含要使用的 JDBC 驱动程序的 JAR 文件的 Amazon Simple Storage Service (Amazon S3) 路径。
  + `JDBC_DRIVER_CLASS_NAME` - 要使用的 JDBC 驱动程序的类名称。
  + `JDBC_ENGINE` - 要使用的 JDBC 引擎的名称。
  + `JDBC_ENGINE_VERSION` - 要使用的 JDBC 引擎的版本。
  + `CONFIG_FILES` -（留待将来使用。）
  + `INSTANCE_ID` - 要使用的实例 ID。
  + `JDBC_CONNECTION_URL` - 用于连接到 JDBC 数据源的 URL。
  + `JDBC_ENFORCE_SSL` – 不区分大小写的布尔值字符串（true 或 false），指定是否对客户端的 JDBC 连接强制启用带主机名匹配的安全套接字层（SSL）。默认值为 false。
  + `CUSTOM_JDBC_CERT` – 指明客户根证书的 Amazon S3 位置。AWS Glue 在连接到客户数据库时，使用此根证书来验证客户的证书。AWS Glue 仅处理 X.509 证书。提供的证书必须经过 DER 编码，并以 Base64 编码 PEM 格式提供。
  + `SKIP_CUSTOM_JDBC_CERT_VALIDATION` – 默认情况下，这是 `false`。AWS Glue 将验证客户证书的签名算法和主题公有密钥算法。签名算法允许的算法仅包括 SHA256withRSA、SHA384withRSA 或 SHA512withRSA。对于主题公有密钥算法，密钥长度必须至少为 2048 位。您可以将该属性的值设置为 `true` 以跳过 AWS Glue 对客户证书进行的验证。
  + `CUSTOM_JDBC_CERT_STRING` - 一个自定义的 JDBC 证书字符串，用于域匹配或可分辨名称匹配以防止中间人攻击。在 Oracle 数据库中，这将用作 `SSL_SERVER_CERT_DN`；在 Microsoft SQL Server 中，这将用作 `hostNameInCertificate`。
  + `CONNECTION_URL` - 用于连接到一般（非 JDBC）数据源的 URL。
  + `SECRET_ID` – 用于凭证的 Secret Manager 的密钥 ID。
  + `CONNECTOR_URL` – MARKETPLACE 或自定义连接的连接器 URL。
  + `CONNECTOR_TYPE` – MARKETPLACE 或自定义连接的连接器类型。
  + `CONNECTOR_CLASS_NAME` – MARKETPLACE 或自定义连接的连接器类名称。
  + `KAFKA_BOOTSTRAP_SERVERS` - 以逗号分隔的主机和端口对列表，它们是 Kafka 集群中 Apache Kafka 代理商的地址，Kafka 客户端将连接到该集群并自行引导。
  + `KAFKA_SSL_ENABLED` – 是否启用或禁用 Apache Kafka 连接的 SSL。默认值为“true”。
  + `KAFKA_CUSTOM_CERT` – 私有 CA 证书文件的 Amazon S3 URL（.pem 格式）。默认值是空字符串。
  + `KAFKA_SKIP_CUSTOM_CERT_VALIDATION` – 是否跳过 CA 证书文件的验证。AWS Glue 验证三种算法：SHA256withRSA、SHA384withRSA 和 SHA512withRSA。默认值为“false”。
  + `KAFKA_CLIENT_KEYSTORE` – 用于 Kafka 客户端身份验证的客户端密钥库文件的 Amazon S3 位置（可选）。
  + `KAFKA_CLIENT_KEYSTORE_PASSWORD` – 用于访问提供的密钥库的密码（可选）。
  + `KAFKA_CLIENT_KEY_PASSWORD` – 密钥库可以由多个密钥组成，因此这是与 Kafka 服务器端密钥一起使用的用于访问客户端密钥的密码（可选）。
  + `ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD` – Kafka 客户端密钥库密码的加密版本（如果用户选中使用 AWS Glue 加密密码设置）。
  + `ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD` – Kafka 客户端密钥密码的加密版本（如果用户选中使用 AWS Glue 加密密码设置）。
  + `KAFKA_SASL_MECHANISM` – `"SCRAM-SHA-512"`、`"GSSAPI"`、`"AWS_MSK_IAM"` 或 `"PLAIN"`。这些是受支持的 [SASL 机制](https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml)。
  + `KAFKA_SASL_PLAIN_USERNAME` – 用于使用“PLAIN”机制进行身份验证的明文用户名。
  + `KAFKA_SASL_PLAIN_PASSWORD` – 用于使用“PLAIN”机制进行身份验证的明文密码。
  + `ENCRYPTED_KAFKA_SASL_PLAIN_PASSWORD` – Kafka SASL PLAIN 密码的加密版本（如果用户选中使用 AWS Glue 加密密码设置）。
  + `KAFKA_SASL_SCRAM_USERNAME` – 用于使用“SCRAM-SHA-512”机制进行身份验证的明文用户名。
  + `KAFKA_SASL_SCRAM_PASSWORD` – 用于使用“SCRAM-SHA-512”机制进行身份验证的明文密码。
  + `ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD` – Kafka SASL SCRAM 密码的加密版本（如果用户选中使用 AWS Glue 加密密码设置）。
  + `KAFKA_SASL_SCRAM_SECRETS_ARN` - AWS Secrets Manager 中密钥的 Amazon 资源名称。
  + `KAFKA_SASL_GSSAPI_KEYTAB` – Kerberos `keytab` 文件的 S3 位置。keytab 可存储一个或多个主体的长期密钥。有关更多信息，请参阅 [MIT Kerberos 文档：keytab](https://web.mit.edu/kerberos/krb5-latest/doc/basic/keytab_def.html)。
  + `KAFKA_SASL_GSSAPI_KRB5_CONF` – Kerberos `krb5.conf` 文件的 S3 位置。krb5.conf 可存储 Kerberos 配置信息，例如 KDC 服务器的位置。有关更多信息，请参阅 [MIT Kerberos 文档：krb5.conf](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html)。
  + `KAFKA_SASL_GSSAPI_SERVICE` – Kerberos 服务名称，如您的 [Kafka 配置](https://kafka.apache.org/documentation/#brokerconfigs_sasl.kerberos.service.name)中的 `sasl.kerberos.service.name` 设置。
  + `KAFKA_SASL_GSSAPI_PRINCIPAL` – 使用的 Kerberos 主体的名称。AWS Glue有关更多信息，请参阅 [Kafka 文档：配置 Kafka 代理](https://kafka.apache.org/documentation/#security_sasl_kerberos_clientconfig)。
  + `ROLE_ARN` – 用于运行查询的角色。
  + `REGION` – 将在其中运行查询的 AWS 区域。
  + `WORKGROUP_NAME` – 将在其中运行查询的 Amazon Redshift Serverless 工作组或 Amazon Athena 工作组的名称。
  + `CLUSTER_IDENTIFIER` – 将在其中运行查询的 Amazon Redshift 集群的集群标识符。
  + `DATABASE` – 您要连接到的 Amazon Redshift 数据库。
+ `SparkProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  特定于 Spark 计算环境的连接属性。
+ `AthenaProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  特定于 Athena 计算环境的连接属性。
+ `PythonProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  特定于 Python 计算环境的连接属性。
+ `PhysicalConnectionRequirements` – 一个 [PhysicalConnectionRequirements](#aws-glue-api-catalog-connections-connections-PhysicalConnectionRequirements) 对象。

  成功建立此连接所需的物理连接要求，如虚拟私有云（VPC）和 `SecurityGroup`。
+ `CreationTime` – 时间戳。

  创建此连接定义的时间的时间戳。
+ `LastUpdatedTime` – 时间戳。

  上次更新此连接定义的时间的时间戳。
+ `LastUpdatedBy` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  上次更新此连接定义的用户、组或角色。
+ `Status` – UTF-8 字符串（有效值：`READY` \$1`IN_PROGRESS` \$1`FAILED` ）。

  连接的状态。可以为以下值之一：`READY`、`IN_PROGRESS` 或 `FAILED`。
+ `StatusReason` – UTF-8 字符串，长度不少于 1 个字节，不超过 16384 个字节。

  连接状态原因。
+ `LastConnectionValidationTime` – 时间戳。

  上次验证此连接的时间的时间戳。
+ `AuthenticationConfiguration` – 一个 [AuthenticationConfiguration](#aws-glue-api-catalog-connections-connections-AuthenticationConfiguration) 对象。

  连接的身份验证属性。
+ `ConnectionSchemaVersion`：数字（整数），不小于 1 或大于 2。

  此连接的连接架构的版本。版本 2 支持特定计算环境的属性。
+ `CompatibleComputeEnvironments` – UTF-8 字符串数组。

  与连接兼容的计算环境列表。

## ConnectionInput 结构
<a name="aws-glue-api-catalog-connections-connections-ConnectionInput"></a>

用于指定要创建或更新的连接的结构。

**Fields**
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接的名称。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  连接的描述。
+ `ConnectionType` – *必填：* UTF-8 字符串（有效值：`JDBC` \$1 `SFTP` \$1 `MONGODB` \$1 `KAFKA` \$1 `NETWORK` \$1 `MARKETPLACE` \$1 `CUSTOM` \$1 `SALESFORCE` \$1 `VIEW_VALIDATION_REDSHIFT` \$1 `VIEW_VALIDATION_ATHENA` \$1 `GOOGLEADS` \$1 `GOOGLESHEETS` \$1 `GOOGLEANALYTICS4` \$1 `SERVICENOW` \$1 `MARKETO` \$1 `SAPODATA` \$1 `ZENDESK` \$1 `JIRACLOUD` \$1 `NETSUITEERP` \$1 `HUBSPOT` \$1 `FACEBOOKADS` \$1 `INSTAGRAMADS` \$1 `ZOHOCRM` \$1 `SALESFORCEPARDOT` \$1 `SALESFORCEMARKETINGCLOUD` \$1 `ADOBEANALYTICS` \$1 `SLACK` \$1 `LINKEDIN` \$1 `MIXPANEL` \$1 `ASANA` \$1 `STRIPE` \$1 `SMARTSHEET` \$1 `DATADOG` \$1 `WOOCOMMERCE` \$1 `INTERCOM` \$1 `SNAPCHATADS` \$1 `PAYPAL` \$1 `QUICKBOOKS` \$1 `FACEBOOKPAGEINSIGHTS` \$1 `FRESHDESK` \$1 `TWILIO` \$1 `DOCUSIGNMONITOR` \$1 `FRESHSALES` \$1 `ZOOM` \$1 `GOOGLESEARCHCONSOLE` \$1 `SALESFORCECOMMERCECLOUD` \$1 `SAPCONCUR` \$1 `DYNATRACE` \$1 `MICROSOFTDYNAMIC365FINANCEANDOPS` \$1 `MICROSOFTTEAMS` \$1 `BLACKBAUDRAISEREDGENXT` \$1 `MAILCHIMP` \$1 `GITLAB` \$1 `PENDO` \$1 `PRODUCTBOARD` \$1 `CIRCLECI` \$1 `PIPEDIVE` \$1 `SENDGRID` \$1 `AZURECOSMOS` \$1 `AZURESQL` \$1 `BIGQUERY` \$1 `BLACKBAUD` \$1 `CLOUDERAHIVE` \$1 `CLOUDERAIMPALA` \$1 `CLOUDWATCH` \$1 `CLOUDWATCHMETRICS` \$1 `CMDB` \$1 `DATALAKEGEN2` \$1 `DB2` \$1 `DB2AS400` \$1 `DOCUMENTDB` \$1 `DOMO` \$1 `DYNAMODB` \$1 `GOOGLECLOUDSTORAGE` \$1 `HBASE` \$1 `KUSTOMER` \$1 `MICROSOFTDYNAMICS365CRM` \$1 `MONDAY` \$1 `MYSQL` \$1 `OKTA` \$1 `OPENSEARCH` \$1 `ORACLE` \$1 `PIPEDRIVE` \$1 `POSTGRESQL` \$1 `SAPHANA` \$1 `SQLSERVER` \$1 `SYNAPSE` \$1 `TERADATA` \$1 `TERADATANOS` \$1 `TIMESTREAM` \$1 `TPCDS` \$1 `VERTICA`）。

  连接的类型。目前，支持以下类型：
  + `JDBC` - 通过 Java 数据库连接（JDBC）指定与数据库的连接。

    `JDBC` 连接使用以下 ConnectionParameters。
    + 必需：所有（`HOST`、`PORT`、`JDBC_ENGINE`）或 `JDBC_CONNECTION_URL`。
    + 必需：所有（`USERNAME`、`PASSWORD`）或 `SECRET_ID`。
    + 可选：`JDBC_ENFORCE_SSL`、`CUSTOM_JDBC_CERT`、`CUSTOM_JDBC_CERT_STRING`、`SKIP_CUSTOM_JDBC_CERT_VALIDATION`。这些参数用于通过 JDBC 配置 SSL。
  + `KAFKA` - 指定与 Apache Kafka 流平台的连接。

    `KAFKA` 连接使用以下 ConnectionParameters。
    + 必需：`KAFKA_BOOTSTRAP_SERVERS`。
    + 可选：`KAFKA_SSL_ENABLED`、`KAFKA_CUSTOM_CERT`、`KAFKA_SKIP_CUSTOM_CERT_VALIDATION`。这些参数用于通过 `KAFKA` 配置 SSL。
    + 可选：`KAFKA_CLIENT_KEYSTORE`、`KAFKA_CLIENT_KEYSTORE_PASSWORD`、`KAFKA_CLIENT_KEY_PASSWORD`、`ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD`、`ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD`。这些参数用于在 `KAFKA` 中通过 SSL 配置 TLS 客户端配置。
    + 可选：`KAFKA_SASL_MECHANISM`。可以指定为 `SCRAM-SHA-512`、`GSSAPI` 或 `AWS_MSK_IAM`。
    + 可选：`KAFKA_SASL_SCRAM_USERNAME`、`KAFKA_SASL_SCRAM_PASSWORD`、`ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD`。这些参数用于通过 `KAFKA` 配置 SASL/SCRAM-SHA-512 身份验证。
    + 可选：`KAFKA_SASL_GSSAPI_KEYTAB`、`KAFKA_SASL_GSSAPI_KRB5_CONF`、`KAFKA_SASL_GSSAPI_SERVICE`、`KAFKA_SASL_GSSAPI_PRINCIPAL`。这些参数用于通过 `KAFKA` 配置 SASL/GSSAPI 身份验证。
  + `MONGODB` - 指定与 MongoDB 文档数据库的连接。

    `MONGODB` 连接使用以下 ConnectionParameters。
    + 必需：`CONNECTION_URL`。
    + 必需：所有（`USERNAME`、`PASSWORD`）或 `SECRET_ID`。
  + `VIEW_VALIDATION_REDSHIFT` – 指定 Amazon Redshift 用于视图验证的连接。
  + `VIEW_VALIDATION_ATHENA` – 指定 Amazon Athena 用于视图验证的连接。
  + `NETWORK` - 指定到 Amazon Virtual Private Cloud 环境（Amazon VPC）中的数据源的网络连接。

    `NETWORK` 连接不需要 ConnectionParameters。相反，提供 PhysicalConnectionRequirements。
  + `MARKETPLACE` – 使用从 AWS Marketplace 购买的连接器中包含的配置设置来读取和写入 AWS Glue 本地不支持的数据存储。

    `MARKETPLACE` 连接使用以下 ConnectionParameters。
    + 必需：`CONNECTOR_TYPE`、`CONNECTOR_URL`、`CONNECTOR_CLASS_NAME`、`CONNECTION_URL`。
    + `JDBC` `CONNECTOR_TYPE` 连接必需：所有（`USERNAME`、`PASSWORD`）或 `SECRET_ID`。
  + `CUSTOM` – 使用自定义连接器中包含的配置设置来读取和写入 本地不支持的数据存储。AWS Glue

  有关特定连接器所需的连接参数的更多信息，请参阅《AWS Glue 用户指南》中的[添加 AWS Glue 连接](https://docs.aws.amazon.com/glue/latest/dg/console-connections.html)中相应连接器的文档。

  `SFTP`不支持 。

  有关如何使用可选的 ConnectionProperties 配置 AWS Glue 中功能的更多信息，请参阅 [AWS Glue 连接属性](https://docs.aws.amazon.com/glue/latest/dg/connection-defining.html)。

  有关如何使用可选的 ConnectionProperties 配置 AWS Glue Studio 中功能的更多信息，请参阅[使用连接器和连接](https://docs.aws.amazon.com/glue/latest/ug/connectors-chapter.html)。
+ `MatchCriteria` – UTF-8 字符串数组，不超过 10 个字符串。

  可用于选择此连接的条件的列表。
+ `ConnectionProperties` – *必填*：键值对的映射数组，不超过 100 对。

  每个键都是一个 UTF-8 字符串（有效值：`HOST` \$1 `PORT` \$1 `USERNAME="USER_NAME"` \$1 `PASSWORD` \$1 `ENCRYPTED_PASSWORD` \$1 `JDBC_DRIVER_JAR_URI` \$1 `JDBC_DRIVER_CLASS_NAME` \$1 `JDBC_ENGINE` \$1 `JDBC_ENGINE_VERSION` \$1 `CONFIG_FILES` \$1 `INSTANCE_ID` \$1 `JDBC_CONNECTION_URL` \$1 `JDBC_ENFORCE_SSL` \$1 `CUSTOM_JDBC_CERT` \$1 `SKIP_CUSTOM_JDBC_CERT_VALIDATION` \$1 `CUSTOM_JDBC_CERT_STRING` \$1 `CONNECTION_URL` \$1 `KAFKA_BOOTSTRAP_SERVERS` \$1 `KAFKA_SSL_ENABLED` \$1 `KAFKA_CUSTOM_CERT` \$1 `KAFKA_SKIP_CUSTOM_CERT_VALIDATION` \$1 `KAFKA_CLIENT_KEYSTORE` \$1 `KAFKA_CLIENT_KEYSTORE_PASSWORD` \$1 `KAFKA_CLIENT_KEY_PASSWORD` \$1 `ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD` \$1 `ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD` \$1 `KAFKA_SASL_MECHANISM` \$1 `KAFKA_SASL_PLAIN_USERNAME` \$1 `KAFKA_SASL_PLAIN_PASSWORD` \$1 `ENCRYPTED_KAFKA_SASL_PLAIN_PASSWORD` \$1 `KAFKA_SASL_SCRAM_USERNAME` \$1 `KAFKA_SASL_SCRAM_PASSWORD` \$1 `KAFKA_SASL_SCRAM_SECRETS_ARN` \$1 `ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD` \$1 `KAFKA_SASL_GSSAPI_KEYTAB` \$1 `KAFKA_SASL_GSSAPI_KRB5_CONF` \$1 `KAFKA_SASL_GSSAPI_SERVICE` \$1 `KAFKA_SASL_GSSAPI_PRINCIPAL` \$1 `SECRET_ID` \$1 `CONNECTOR_URL` \$1 `CONNECTOR_TYPE` \$1 `CONNECTOR_CLASS_NAME` \$1 `ENDPOINT` \$1 `ENDPOINT_TYPE` \$1 `ROLE_ARN` \$1 `REGION` \$1 `WORKGROUP_NAME` \$1 `CLUSTER_IDENTIFIER` \$1 `DATABASE`）。

  每个值都是一个值字符串，长度不少于 1 个字节，不超过 1024 个字节。

  这些键值对用于定义连接的参数。
+ `SparkProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  特定于 Spark 计算环境的连接属性。
+ `AthenaProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  特定于 Athena 计算环境的连接属性。
+ `PythonProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  特定于 Python 计算环境的连接属性。
+ `PhysicalConnectionRequirements` – 一个 [PhysicalConnectionRequirements](#aws-glue-api-catalog-connections-connections-PhysicalConnectionRequirements) 对象。

  成功建立此连接所需的物理连接要求，如虚拟私有云（VPC）和 `SecurityGroup`。
+ `AuthenticationConfiguration` – 一个 [AuthenticationConfigurationInput](#aws-glue-api-catalog-connections-connections-AuthenticationConfigurationInput) 对象。

  连接的身份验证属性。
+ `ValidateCredentials` – 布尔值。

  用于在创建连接期间验证凭证的标志。默认设置为 true。
+ `ValidateForComputeEnvironments` – UTF-8 字符串数组。

  用于验证指定的连接属性的计算环境。

## TestConnectionInput 结构
<a name="aws-glue-api-catalog-connections-connections-TestConnectionInput"></a>

用于指定测试与服务的连接的结构。

**Fields**
+ `ConnectionType` – *必填：* UTF-8 字符串（有效值：`JDBC` \$1 `SFTP` \$1 `MONGODB` \$1 `KAFKA` \$1 `NETWORK` \$1 `MARKETPLACE` \$1 `CUSTOM` \$1 `SALESFORCE` \$1 `VIEW_VALIDATION_REDSHIFT` \$1 `VIEW_VALIDATION_ATHENA` \$1 `GOOGLEADS` \$1 `GOOGLESHEETS` \$1 `GOOGLEANALYTICS4` \$1 `SERVICENOW` \$1 `MARKETO` \$1 `SAPODATA` \$1 `ZENDESK` \$1 `JIRACLOUD` \$1 `NETSUITEERP` \$1 `HUBSPOT` \$1 `FACEBOOKADS` \$1 `INSTAGRAMADS` \$1 `ZOHOCRM` \$1 `SALESFORCEPARDOT` \$1 `SALESFORCEMARKETINGCLOUD` \$1 `ADOBEANALYTICS` \$1 `SLACK` \$1 `LINKEDIN` \$1 `MIXPANEL` \$1 `ASANA` \$1 `STRIPE` \$1 `SMARTSHEET` \$1 `DATADOG` \$1 `WOOCOMMERCE` \$1 `INTERCOM` \$1 `SNAPCHATADS` \$1 `PAYPAL` \$1 `QUICKBOOKS` \$1 `FACEBOOKPAGEINSIGHTS` \$1 `FRESHDESK` \$1 `TWILIO` \$1 `DOCUSIGNMONITOR` \$1 `FRESHSALES` \$1 `ZOOM` \$1 `GOOGLESEARCHCONSOLE` \$1 `SALESFORCECOMMERCECLOUD` \$1 `SAPCONCUR` \$1 `DYNATRACE` \$1 `MICROSOFTDYNAMIC365FINANCEANDOPS` \$1 `MICROSOFTTEAMS` \$1 `BLACKBAUDRAISEREDGENXT` \$1 `MAILCHIMP` \$1 `GITLAB` \$1 `PENDO` \$1 `PRODUCTBOARD` \$1 `CIRCLECI` \$1 `PIPEDIVE` \$1 `SENDGRID` \$1 `AZURECOSMOS` \$1 `AZURESQL` \$1 `BIGQUERY` \$1 `BLACKBAUD` \$1 `CLOUDERAHIVE` \$1 `CLOUDERAIMPALA` \$1 `CLOUDWATCH` \$1 `CLOUDWATCHMETRICS` \$1 `CMDB` \$1 `DATALAKEGEN2` \$1 `DB2` \$1 `DB2AS400` \$1 `DOCUMENTDB` \$1 `DOMO` \$1 `DYNAMODB` \$1 `GOOGLECLOUDSTORAGE` \$1 `HBASE` \$1 `KUSTOMER` \$1 `MICROSOFTDYNAMICS365CRM` \$1 `MONDAY` \$1 `MYSQL` \$1 `OKTA` \$1 `OPENSEARCH` \$1 `ORACLE` \$1 `PIPEDRIVE` \$1 `POSTGRESQL` \$1 `SAPHANA` \$1 `SQLSERVER` \$1 `SYNAPSE` \$1 `TERADATA` \$1 `TERADATANOS` \$1 `TIMESTREAM` \$1 `TPCDS` \$1 `VERTICA`）。

  要测试的连接类型。此操作仅适用于 `JDBC` 或 `SALESFORCE` 连接类型。
+ `ConnectionProperties` – *必填*：键值对的映射数组，不超过 100 对。

  每个键都是一个 UTF-8 字符串（有效值：`HOST` \$1 `PORT` \$1 `USERNAME="USER_NAME"` \$1 `PASSWORD` \$1 `ENCRYPTED_PASSWORD` \$1 `JDBC_DRIVER_JAR_URI` \$1 `JDBC_DRIVER_CLASS_NAME` \$1 `JDBC_ENGINE` \$1 `JDBC_ENGINE_VERSION` \$1 `CONFIG_FILES` \$1 `INSTANCE_ID` \$1 `JDBC_CONNECTION_URL` \$1 `JDBC_ENFORCE_SSL` \$1 `CUSTOM_JDBC_CERT` \$1 `SKIP_CUSTOM_JDBC_CERT_VALIDATION` \$1 `CUSTOM_JDBC_CERT_STRING` \$1 `CONNECTION_URL` \$1 `KAFKA_BOOTSTRAP_SERVERS` \$1 `KAFKA_SSL_ENABLED` \$1 `KAFKA_CUSTOM_CERT` \$1 `KAFKA_SKIP_CUSTOM_CERT_VALIDATION` \$1 `KAFKA_CLIENT_KEYSTORE` \$1 `KAFKA_CLIENT_KEYSTORE_PASSWORD` \$1 `KAFKA_CLIENT_KEY_PASSWORD` \$1 `ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD` \$1 `ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD` \$1 `KAFKA_SASL_MECHANISM` \$1 `KAFKA_SASL_PLAIN_USERNAME` \$1 `KAFKA_SASL_PLAIN_PASSWORD` \$1 `ENCRYPTED_KAFKA_SASL_PLAIN_PASSWORD` \$1 `KAFKA_SASL_SCRAM_USERNAME` \$1 `KAFKA_SASL_SCRAM_PASSWORD` \$1 `KAFKA_SASL_SCRAM_SECRETS_ARN` \$1 `ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD` \$1 `KAFKA_SASL_GSSAPI_KEYTAB` \$1 `KAFKA_SASL_GSSAPI_KRB5_CONF` \$1 `KAFKA_SASL_GSSAPI_SERVICE` \$1 `KAFKA_SASL_GSSAPI_PRINCIPAL` \$1 `SECRET_ID` \$1 `CONNECTOR_URL` \$1 `CONNECTOR_TYPE` \$1 `CONNECTOR_CLASS_NAME` \$1 `ENDPOINT` \$1 `ENDPOINT_TYPE` \$1 `ROLE_ARN` \$1 `REGION` \$1 `WORKGROUP_NAME` \$1 `CLUSTER_IDENTIFIER` \$1 `DATABASE`）。

  每个值都是一个值字符串，长度不少于 1 个字节，不超过 1024 个字节。

  定义连接的参数的键值对。

  JDBC 连接使用下面的连接属性：
  + 必需：所有（`HOST`、`PORT`、`JDBC_ENGINE`）或 `JDBC_CONNECTION_URL`。
  + 必需：所有（`USERNAME`、`PASSWORD`）或 `SECRET_ID`。
  + 可选：`JDBC_ENFORCE_SSL`、`CUSTOM_JDBC_CERT`、`CUSTOM_JDBC_CERT_STRING`、`SKIP_CUSTOM_JDBC_CERT_VALIDATION`。这些参数用于通过 JDBC 配置 SSL。

  SALESFORCE 连接需要配置 `AuthenticationConfiguration` 成员。
+ `AuthenticationConfiguration` – 一个 [AuthenticationConfigurationInput](#aws-glue-api-catalog-connections-connections-AuthenticationConfigurationInput) 对象。

  在 TestConnection 请求中包含身份验证配置的结构。使用 OAuth 身份验证连接到 Salesforce 所必需的。

## PhysicalConnectionRequirements 结构
<a name="aws-glue-api-catalog-connections-connections-PhysicalConnectionRequirements"></a>

GetConnection 响应中的 OAuth 客户端应用程序。

**Fields**
+ `SubnetId` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接使用的子网 ID。
+ `SecurityGroupIdList` – UTF-8 字符串数组，不超过 50 个字符串。

  连接使用的安全组 ID 列表。
+ `AvailabilityZone` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接的可用区。

## GetConnectionsFilter 结构
<a name="aws-glue-api-catalog-connections-connections-GetConnectionsFilter"></a>

筛选由 `GetConnections` API 操作返回的连接定义。

**Fields**
+ `MatchCriteria` – UTF-8 字符串数组，不超过 10 个字符串。

  一个条件字符串，它必须与连接定义中记录的条件相匹配，才能返回连接定义。
+ `ConnectionType` – UTF-8 字符串（有效值：`JDBC` \$1 `SFTP` \$1 `MONGODB` \$1 `KAFKA` \$1 `NETWORK` \$1 `MARKETPLACE` \$1 `CUSTOM` \$1 `SALESFORCE` \$1 `VIEW_VALIDATION_REDSHIFT` \$1 `VIEW_VALIDATION_ATHENA` \$1 `GOOGLEADS` \$1 `GOOGLESHEETS` \$1 `GOOGLEANALYTICS4` \$1 `SERVICENOW` \$1 `MARKETO` \$1 `SAPODATA` \$1 `ZENDESK` \$1 `JIRACLOUD` \$1 `NETSUITEERP` \$1 `HUBSPOT` \$1 `FACEBOOKADS` \$1 `INSTAGRAMADS` \$1 `ZOHOCRM` \$1 `SALESFORCEPARDOT` \$1 `SALESFORCEMARKETINGCLOUD` \$1 `ADOBEANALYTICS` \$1 `SLACK` \$1 `LINKEDIN` \$1 `MIXPANEL` \$1 `ASANA` \$1 `STRIPE` \$1 `SMARTSHEET` \$1 `DATADOG` \$1 `WOOCOMMERCE` \$1 `INTERCOM` \$1 `SNAPCHATADS` \$1 `PAYPAL` \$1 `QUICKBOOKS` \$1 `FACEBOOKPAGEINSIGHTS` \$1 `FRESHDESK` \$1 `TWILIO` \$1 `DOCUSIGNMONITOR` \$1 `FRESHSALES` \$1 `ZOOM` \$1 `GOOGLESEARCHCONSOLE` \$1 `SALESFORCECOMMERCECLOUD` \$1 `SAPCONCUR` \$1 `DYNATRACE` \$1 `MICROSOFTDYNAMIC365FINANCEANDOPS` \$1 `MICROSOFTTEAMS` \$1 `BLACKBAUDRAISEREDGENXT` \$1 `MAILCHIMP` \$1 `GITLAB` \$1 `PENDO` \$1 `PRODUCTBOARD` \$1 `CIRCLECI` \$1 `PIPEDIVE` \$1 `SENDGRID` \$1 `AZURECOSMOS` \$1 `AZURESQL` \$1 `BIGQUERY` \$1 `BLACKBAUD` \$1 `CLOUDERAHIVE` \$1 `CLOUDERAIMPALA` \$1 `CLOUDWATCH` \$1 `CLOUDWATCHMETRICS` \$1 `CMDB` \$1 `DATALAKEGEN2` \$1 `DB2` \$1 `DB2AS400` \$1 `DOCUMENTDB` \$1 `DOMO` \$1 `DYNAMODB` \$1 `GOOGLECLOUDSTORAGE` \$1 `HBASE` \$1 `KUSTOMER` \$1 `MICROSOFTDYNAMICS365CRM` \$1 `MONDAY` \$1 `MYSQL` \$1 `OKTA` \$1 `OPENSEARCH` \$1 `ORACLE` \$1 `PIPEDRIVE` \$1 `POSTGRESQL` \$1 `SAPHANA` \$1 `SQLSERVER` \$1 `SYNAPSE` \$1 `TERADATA` \$1 `TERADATANOS` \$1 `TIMESTREAM` \$1 `TPCDS` \$1 `VERTICA`）。

  要返回的连接的类型。目前不支持 SFTP。
+ `ConnectionSchemaVersion`：数字（整数），不小于 1 或大于 2。

  指示连接是使用架构版本 1 还是 2 创建的。

## AuthenticationConfiguration 结构
<a name="aws-glue-api-catalog-connections-connections-AuthenticationConfiguration"></a>

包含身份验证配置的结构。

**Fields**
+ `AuthenticationType` – UTF-8 字符串（有效值：`BASIC` \$1`OAUTH2` \$1`CUSTOM` \$1`IAM` ）。

  包含身份验证配置的结构。
+ `SecretArn` – UTF-8 字符串，与 [Custom string pattern #36](aws-glue-api-common.md#regex_36) 匹配。

  用于存储凭证的 Secrets Manager ARN。
+ `KmsKeyArn` – UTF-8 字符串，与 [Custom string pattern #42](aws-glue-api-common.md#regex_42) 匹配。

  用于加密敏感身份验证信息的 KMS 密钥的 Amazon 资源名称 (ARN)。此密钥用于保护存储在身份验证配置中的凭证和其他敏感数据。
+ `OAuth2Properties` – 一个 [OAuth2Properties](#aws-glue-api-catalog-connections-connections-OAuth2Properties) 对象。

  OAuth2 身份验证的属性。

## AuthenticationConfigurationInput 结构
<a name="aws-glue-api-catalog-connections-connections-AuthenticationConfigurationInput"></a>

在 CreateConnection 请求中包含身份验证配置的结构。

**Fields**
+ `AuthenticationType` – UTF-8 字符串（有效值：`BASIC` \$1`OAUTH2` \$1`CUSTOM` \$1`IAM` ）。

  在 CreateConnection 请求中包含身份验证配置的结构。
+ `OAuth2Properties` – 一个 [OAuth2PropertiesInput](#aws-glue-api-catalog-connections-connections-OAuth2PropertiesInput) 对象。

  CreateConnection 请求中 OAuth2 身份验证的属性。
+ `SecretArn` – UTF-8 字符串，与 [Custom string pattern #36](aws-glue-api-common.md#regex_36) 匹配。

  用于在 CreateConnection 请求中存储凭证的 Secrets Manager ARN。
+ `KmsKeyArn` – UTF-8 字符串，与 [Custom string pattern #42](aws-glue-api-common.md#regex_42) 匹配。

  用于加密连接的 KMS 密钥的 ARN。仅作为请求中的输入并存储在 Secret Manager 中。
+ `BasicAuthenticationCredentials` – 一个 [BasicAuthenticationCredentials](#aws-glue-api-catalog-connections-connections-BasicAuthenticationCredentials) 对象。

  身份验证类型为基本身份验证时使用的凭证。
+ `CustomAuthenticationCredentials` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 2048 个字节。

  身份验证类型为自定义身份验证时使用的凭证。

## OAuth2Properties 结构
<a name="aws-glue-api-catalog-connections-connections-OAuth2Properties"></a>

包含 OAuth2 身份验证属性的结构。

**Fields**
+ `OAuth2GrantType` – UTF-8 字符串（有效值：`AUTHORIZATION_CODE` \$1`CLIENT_CREDENTIALS` \$1`JWT_BEARER` ）。

  OAuth2 授权类型。例如，`AUTHORIZATION_CODE`、`JWT_BEARER` 或 `CLIENT_CREDENTIALS`。
+ `OAuth2ClientApplication` – 一个 [OAuth2ClientApplication](#aws-glue-api-catalog-connections-connections-OAuth2ClientApplication) 对象。

  客户端应用程序类型。例如，AWS\$1MANAGED 或 USER\$1MANAGED。
+ `TokenUrl` – UTF-8 字符串，长度不超过 256 个字节，与 [Custom string pattern #40](aws-glue-api-common.md#regex_40) 匹配。

  提供程序身份验证服务器的 URL，用于以授权代码交换访问令牌。
+ `TokenUrlParametersMap` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 512 个字节。

  添加到令牌 `GET` 请求中的参数的映射。

## OAuth2PropertiesInput 结构
<a name="aws-glue-api-catalog-connections-connections-OAuth2PropertiesInput"></a>

在 CreateConnection 请求中包含 OAuth2 属性的结构。

**Fields**
+ `OAuth2GrantType` – UTF-8 字符串（有效值：`AUTHORIZATION_CODE` \$1`CLIENT_CREDENTIALS` \$1`JWT_BEARER` ）。

  CreateConnection 请求中的 OAuth2 授权类型。例如，`AUTHORIZATION_CODE`、`JWT_BEARER` 或 `CLIENT_CREDENTIALS`。
+ `OAuth2ClientApplication` – 一个 [OAuth2ClientApplication](#aws-glue-api-catalog-connections-connections-OAuth2ClientApplication) 对象。

  CreateConnection 请求中的客户端应用程序类型。例如，`AWS_MANAGED` 或 `USER_MANAGED`。
+ `TokenUrl` – UTF-8 字符串，长度不超过 256 个字节，与 [Custom string pattern #40](aws-glue-api-common.md#regex_40) 匹配。

  提供程序身份验证服务器的 URL，用于以授权代码交换访问令牌。
+ `TokenUrlParametersMap` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 512 个字节。

  添加到令牌 `GET` 请求中的参数的映射。
+ `AuthorizationCodeProperties` – 一个 [AuthorizationCodeProperties](#aws-glue-api-catalog-connections-connections-AuthorizationCodeProperties) 对象。

  OAuth2 `AUTHORIZATION_CODE` 授权类型所需的属性集。
+ `OAuth2Credentials` – 一个 [OAuth2Credentials](#aws-glue-api-catalog-connections-connections-OAuth2Credentials) 对象。

  身份验证类型为 OAuth2 身份验证时使用的凭证。

## OAuth2ClientApplication 结构
<a name="aws-glue-api-catalog-connections-connections-OAuth2ClientApplication"></a>

用于连接的 OAuth2 客户端应用程序。

**Fields**
+ `UserManagedClientApplicationClientId` – UTF-8 字符串，长度不超过 2048 个字节，与 [Custom string pattern #37](aws-glue-api-common.md#regex_37) 匹配。

  如果 ClientAppType 是 `USER_MANAGED`，则为客户端应用程序 clientID。
+ `AWSManagedClientApplicationReference` – UTF-8 字符串，长度不超过 2048 个字节，与 [Custom string pattern #37](aws-glue-api-common.md#regex_37) 匹配。

  对 AWS 托管的 SaaS 端客户端应用程序的引用。

## AuthorizationCodeProperties 结构
<a name="aws-glue-api-catalog-connections-connections-AuthorizationCodeProperties"></a>

OAuth2 `AUTHORIZATION_CODE` 授权类型工作流所需的属性集。

**Fields**
+ `AuthorizationCode` – UTF-8 字符串，长度不少于 1 个字节，不超过 4096 个字节，与 [Custom string pattern #37](aws-glue-api-common.md#regex_37) 匹配。

  将在 `AUTHORIZATION_CODE` 授权工作流的第三分支中使用的授权代码。这是一次性代码，一旦用于交换访问令牌后就会失效，因此可以将此值作为请求参数。
+ `RedirectUri` – UTF-8 字符串，长度不超过 512 个字节，与 [Custom string pattern #41](aws-glue-api-common.md#regex_41) 匹配。

  重定向 URI，在发布授权代码时授权服务器将用户重定向到此处。随后，在将授权代码交换为访问令牌时使用该 URI。

## BasicAuthenticationCredentials 结构
<a name="aws-glue-api-catalog-connections-connections-BasicAuthenticationCredentials"></a>

用于在不提供 `SecretArn` 值时提供基本身份验证凭证。

**Fields**
+ `Username` – UTF-8 字符串，长度不超过 512 个字节，与 [Custom string pattern #37](aws-glue-api-common.md#regex_37) 匹配。

  用于连接到数据来源的用户名。
+ `Password` – UTF-8 字符串，长度不超过 512 个字节，与 [Custom string pattern #33](aws-glue-api-common.md#regex_33) 匹配。

  用于连接到数据来源的密码。

## OAuth2Credentials 结构
<a name="aws-glue-api-catalog-connections-connections-OAuth2Credentials"></a>

身份验证类型为 OAuth2 身份验证时使用的凭证。

**Fields**
+ `UserManagedClientApplicationClientSecret` – UTF-8 字符串，长度不超过 512 个字节，与 [Custom string pattern #38](aws-glue-api-common.md#regex_38) 匹配。

  如果客户端应用程序为用户管理型，则为客户端应用程序客户端秘钥。
+ `AccessToken`：UTF-8 字符串，长度不超过 4096 个字节，与 [Custom string pattern #38](aws-glue-api-common.md#regex_38) 匹配。

  身份验证类型为 OAuth2 时使用的访问令牌。
+ `RefreshToken`：UTF-8 字符串，长度不超过 4096 个字节，与 [Custom string pattern #38](aws-glue-api-common.md#regex_38) 匹配。

  身份验证类型为 OAuth2 时使用的刷新令牌。
+ `JwtToken`：UTF-8 字符串，长度不超过 8000 个字节，与 [Custom string pattern #39](aws-glue-api-common.md#regex_39) 匹配。

  身份验证类型为 OAuth2 时使用的 JSON Web 令牌（JWT）。

## 操作
<a name="aws-glue-api-catalog-connections-connections-actions"></a>
+ [CreateConnection 操作（Python：create\$1connection）](#aws-glue-api-catalog-connections-connections-CreateConnection)
+ [DeleteConnection 操作（Python：delete\$1connection）](#aws-glue-api-catalog-connections-connections-DeleteConnection)
+ [GetConnection 操作（Python：get\$1connection）](#aws-glue-api-catalog-connections-connections-GetConnection)
+ [GetConnections 操作（Python：get\$1connections）](#aws-glue-api-catalog-connections-connections-GetConnections)
+ [UpdateConnection 操作（Python：update\$1connection）](#aws-glue-api-catalog-connections-connections-UpdateConnection)
+ [TestConnection 操作（Python：test\$1connection）](#aws-glue-api-catalog-connections-connections-TestConnection)
+ [BatchDeleteConnection 操作（Python：batch\$1delete\$1connection）](#aws-glue-api-catalog-connections-connections-BatchDeleteConnection)

## CreateConnection 操作（Python：create\$1connection）
<a name="aws-glue-api-catalog-connections-connections-CreateConnection"></a>

在数据目录中创建连接定义。

用于创建联合资源的连接需要 IAM `glue:PassConnection` 权限。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建连接的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `ConnectionInput` – *必填：*一个 [ConnectionInput](#aws-glue-api-catalog-connections-connections-ConnectionInput) 对象。

  用于定义要创建的连接的 `ConnectionInput` 对象。
+ `Tags` – 键值对的映射数组，不超过 50 对。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值是一个 UTF-8 字符串，不超过 256 个字节。

  您分配给连接的标签。

**响应**
+ `CreateConnectionStatus` – UTF-8 字符串（有效值：`READY` \$1`IN_PROGRESS` \$1`FAILED` ）。

  连接创建请求的状态。对于某些身份验证类型，请求可能需要一些时间，例如在 VPC 上创建包含令牌交换 OAuth 连接时。

**错误**
+ `AlreadyExistsException`
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `ResourceNumberLimitExceededException`
+ `GlueEncryptionException`

## DeleteConnection 操作（Python：delete\$1connection）
<a name="aws-glue-api-catalog-connections-connections-DeleteConnection"></a>

从数据目录中删除连接。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `ConnectionName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的连接的名称。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `OperationTimeoutException`

## GetConnection 操作（Python：get\$1connection）
<a name="aws-glue-api-catalog-connections-connections-GetConnection"></a>

从数据目录中检索连接定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要检索的连接定义的名称。
+ `HidePassword` – 布尔值。

  允许您在不返回密码的情况下检索连接元数据。例如，AWS Glue 控制台使用此标记来检索连接，并且不显示密码。当调用方可能无权使用 AWS KMS 密钥解密密码，但有权访问其余连接属性时，请设置此参数。
+ `ApplyOverrideForComputeEnvironment` – UTF-8 字符串（有效值：`SPARK` \$1`ATHENA` \$1`PYTHON` ）。

  对于可能在多个服务中使用的连接，指定为指定的计算环境返回属性。

**响应**
+ `Connection` – 一个 [Connection](#aws-glue-api-catalog-connections-connections-Connection) 对象。

  请求的连接定义。

**错误**
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `GlueEncryptionException`

## GetConnections 操作（Python：get\$1connections）
<a name="aws-glue-api-catalog-connections-connections-GetConnections"></a>

从数据目录中检索连接定义的列表。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `Filter` – 一个 [GetConnectionsFilter](#aws-glue-api-catalog-connections-connections-GetConnectionsFilter) 对象。

  控制将返回哪些连接的筛选器。
+ `HidePassword` – 布尔值。

  允许您在不返回密码的情况下检索连接元数据。例如，AWS Glue 控制台使用此标记来检索连接，并且不显示密码。当调用方可能无权使用 AWS KMS 密钥解密密码，但有权访问其余连接属性时，请设置此参数。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。
+ `MaxResults` – 数字（整数），不小于 1 或大于 1000。

  要在一个响应中返回的连接的最大数量。

**响应**
+ `ConnectionList` – [Connection](#aws-glue-api-catalog-connections-connections-Connection) 对象的数组。

  请求的连接定义的列表。
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果返回的连接列表不包括最后一个筛选的连接)。

**错误**
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `GlueEncryptionException`

## UpdateConnection 操作（Python：update\$1connection）
<a name="aws-glue-api-catalog-connections-connections-UpdateConnection"></a>

在数据目录中更新连接定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `Name` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要更新的连接定义的名称。
+ `ConnectionInput` – *必填：*一个 [ConnectionInput](#aws-glue-api-catalog-connections-connections-ConnectionInput) 对象。

  用于重新定义所涉连接的 `ConnectionInput` 对象。

**响应**
+ *无响应参数。*

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `GlueEncryptionException`

## TestConnection 操作（Python：test\$1connection）
<a name="aws-glue-api-catalog-connections-connections-TestConnection"></a>

测试与某服务的连接以验证您提供的服务凭证。

您可以提供现有的连接名称或 `TestConnectionInput` 来测试不存在的连接输入。同时提供两者将导致错误。

如果此操作成功，则该服务将会发送回 HTTP 200 响应。

**请求**
+ `ConnectionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  可选。要测试的连接的名称。如果仅提供名称，则操作将获取连接并使用它来进行测试。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接所在的目录的 ID。
+ `TestConnectionInput` – 一个 [TestConnectionInput](#aws-glue-api-catalog-connections-connections-TestConnectionInput) 对象。

  用于指定测试与服务的连接的结构。

**响应**
+ *无响应参数。*

**错误**
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `ResourceNumberLimitExceededException`
+ `GlueEncryptionException`
+ `FederationSourceException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ConflictException`
+ `InternalServiceException`

## BatchDeleteConnection 操作（Python：batch\$1delete\$1connection）
<a name="aws-glue-api-catalog-connections-connections-BatchDeleteConnection"></a>

从数据目录中删除连接定义的列表。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `ConnectionNameList` – *必填：*UTF-8 字符串数组，不超过 25 个字符串。

  要删除的连接的名称的列表。

**响应**
+ `Succeeded` – UTF-8 字符串数组。

  已成功删除的连接定义的名称的列表。
+ `Errors` – 键值对的映射数组。

  每个键是一个 UTF-8 字符串，不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  每个值都是一个 [ErrorDetail](aws-glue-api-common.md#aws-glue-api-common-ErrorDetail) 对象。

  未成功删除的连接名称到错误详细信息的映射。

**错误**
+ `InternalServiceException`
+ `OperationTimeoutException`

# 连接类型 API
<a name="aws-glue-api-catalog-connections-connections-type"></a>

连接类型 API 描述与描述连接类型相关的 AWS Glue API。

## 连接管理 API
<a name="aws-glue-api-catalog-connections-connections-type-connection-management"></a>
+ [DescribeConnectionType 操作（Python：describe\$1connection\$1type）](#aws-glue-api-catalog-connections-connections-type-DescribeConnectionType)
+ [ListConnectionTypes 操作（Python：list\$1connection\$1types）](#aws-glue-api-catalog-connections-connections-type-ListConnectionTypes)
+ [ConnectionTypeBrief 结构](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeBrief)
+ [ConnectionTypeVariant 结构](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeVariant)

## DescribeConnectionType 操作（Python：describe\$1connection\$1type）
<a name="aws-glue-api-catalog-connections-connections-type-DescribeConnectionType"></a>

`DescribeConnectionType` API 提供 AWS Glue 中给定连接类型支持的选项的完整详细信息。

**请求**
+ `ConnectionType` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要描述的连接类型的名称。

**响应**
+ `ConnectionType` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  连接类型的名称。
+ `Description` – UTF-8 字符串，长度不超过 1024 个字节。

  连接类型的描述。
+ `Capabilities` – 一个 [功能](#aws-glue-api-catalog-connections-connections-type-Capabilities) 对象。

  连接器支持的身份验证类型、数据接口类型（计算环境）以及数据操作。
+ `ConnectionProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  跨计算环境的通用连接属性。
+ `ConnectionOptions` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  返回在 `ConnectionInput.ConnectionProperties` 中创建连接时可以设置的属性。`ConnectionOptions` 定义可以在传递给 DataFrame 的连接选项映射中的 Spark ETL 脚本中设置的参数。
+ `AuthenticationConfiguration` – 一个 [AuthConfiguration](#aws-glue-api-catalog-connections-connections-type-AuthConfiguration) 对象。

  用于连接的身份验证类型。
+ `ComputeEnvironmentConfigurations` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [ComputeEnvironmentConfiguration](#aws-glue-api-catalog-connections-connections-type-ComputeEnvironmentConfiguration) 对象。

  连接支持的计算环境。
+ `PhysicalConnectionRequirements` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  连接的物理要求，如 VPC、子网和安全组规范。
+ `AthenaConnectionProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  特定于 Athena 计算环境的连接属性。
+ `PythonConnectionProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  特定于 Python 计算环境的连接属性。
+ `SparkConnectionProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  特定于 Spark 计算环境的连接属性。

**错误**
+ `ValidationException`
+ `InvalidInputException`
+ `InternalServiceException`

## ListConnectionTypes 操作（Python：list\$1connection\$1types）
<a name="aws-glue-api-catalog-connections-connections-type-ListConnectionTypes"></a>

`ListConnectionTypes` API 提供了一种发现机制，用于了解 AWS Glue 中可用的连接类型。响应包含连接类型列表以及每种连接类型支持的内容的高级详细信息。列出的连接类型是 `CreateConnection` API 中 `ConnectionType` 值支持的选项集。

**请求**
+ `MaxResults` – 数字（整数），不小于 1 或大于 1000。

  要返回的最大结果数量。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续标记 (如果这是延续调用)。

**响应**
+ `ConnectionTypes` – [ConnectionTypeBrief](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeBrief) 对象的数组。

  `ConnectionTypeBrief` 对象列表，包含有关支持的连接类型的简要信息。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续令牌（如果当前列表片段不是最后一个片段）。

**错误**
+ `InternalServiceException`

## ConnectionTypeBrief 结构
<a name="aws-glue-api-catalog-connections-connections-type-ConnectionTypeBrief"></a>

`ListConnectionTypes` API 返回的有关支持的连接类型的简要信息。

**Fields**
+ `ConnectionType` – UTF-8 字符串（有效值：`JDBC` \$1 `SFTP` \$1 `MONGODB` \$1 `KAFKA` \$1 `NETWORK` \$1 `MARKETPLACE` \$1 `CUSTOM` \$1 `SALESFORCE` \$1 `VIEW_VALIDATION_REDSHIFT` \$1 `VIEW_VALIDATION_ATHENA` \$1 `GOOGLEADS` \$1 `GOOGLESHEETS` \$1 `GOOGLEANALYTICS4` \$1 `SERVICENOW` \$1 `MARKETO` \$1 `SAPODATA` \$1 `ZENDESK` \$1 `JIRACLOUD` \$1 `NETSUITEERP` \$1 `HUBSPOT` \$1 `FACEBOOKADS` \$1 `INSTAGRAMADS` \$1 `ZOHOCRM` \$1 `SALESFORCEPARDOT` \$1 `SALESFORCEMARKETINGCLOUD` \$1 `ADOBEANALYTICS` \$1 `SLACK` \$1 `LINKEDIN` \$1 `MIXPANEL` \$1 `ASANA` \$1 `STRIPE` \$1 `SMARTSHEET` \$1 `DATADOG` \$1 `WOOCOMMERCE` \$1 `INTERCOM` \$1 `SNAPCHATADS` \$1 `PAYPAL` \$1 `QUICKBOOKS` \$1 `FACEBOOKPAGEINSIGHTS` \$1 `FRESHDESK` \$1 `TWILIO` \$1 `DOCUSIGNMONITOR` \$1 `FRESHSALES` \$1 `ZOOM` \$1 `GOOGLESEARCHCONSOLE` \$1 `SALESFORCECOMMERCECLOUD` \$1 `SAPCONCUR` \$1 `DYNATRACE` \$1 `MICROSOFTDYNAMIC365FINANCEANDOPS` \$1 `MICROSOFTTEAMS` \$1 `BLACKBAUDRAISEREDGENXT` \$1 `MAILCHIMP` \$1 `GITLAB` \$1 `PENDO` \$1 `PRODUCTBOARD` \$1 `CIRCLECI` \$1 `PIPEDIVE` \$1 `SENDGRID` \$1 `AZURECOSMOS` \$1 `AZURESQL` \$1 `BIGQUERY` \$1 `BLACKBAUD` \$1 `CLOUDERAHIVE` \$1 `CLOUDERAIMPALA` \$1 `CLOUDWATCH` \$1 `CLOUDWATCHMETRICS` \$1 `CMDB` \$1 `DATALAKEGEN2` \$1 `DB2` \$1 `DB2AS400` \$1 `DOCUMENTDB` \$1 `DOMO` \$1 `DYNAMODB` \$1 `GOOGLECLOUDSTORAGE` \$1 `HBASE` \$1 `KUSTOMER` \$1 `MICROSOFTDYNAMICS365CRM` \$1 `MONDAY` \$1 `MYSQL` \$1 `OKTA` \$1 `OPENSEARCH` \$1 `ORACLE` \$1 `PIPEDRIVE` \$1 `POSTGRESQL` \$1 `SAPHANA` \$1 `SQLSERVER` \$1 `SYNAPSE` \$1 `TERADATA` \$1 `TERADATANOS` \$1 `TIMESTREAM` \$1 `TPCDS` \$1 `VERTICA`）。

  连接类型的名称。
+ `DisplayName` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  AWS Glue 控制台中显示的连接类型的人类可读名称。
+ `Vendor` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  创建或维护此连接类型的供应商或者提供商的名称。
+ `Description` – UTF-8 字符串，长度不超过 1024 个字节。

  连接类型的描述。
+ `Categories` – .

  此连接类型所属的类别列表。类别可帮助用户根据其用例筛选并找到合适的连接类型。
+ `Capabilities` – 一个 [功能](#aws-glue-api-catalog-connections-connections-type-Capabilities) 对象。

  连接器支持的身份验证类型、数据接口类型（计算环境）以及数据操作。
+ `LogoUrl` – UTF-8 字符串。

  与连接类型相关联的徽标的 URL。
+ `ConnectionTypeVariants` – [ConnectionTypeVariant](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeVariant) 对象的数组。

  此连接类型可用的变体列表。不同的变体可能会为特定用例或相同通用连接类型的实现提供专门的配置。

## ConnectionTypeVariant 结构
<a name="aws-glue-api-catalog-connections-connections-type-ConnectionTypeVariant"></a>

表示 AWS Glue Data Catalog 中连接类型的变体。连接类型变体为同一通用连接类型的不同实现提供特定的配置和行为。

**Fields**
+ `ConnectionTypeVariantName` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  连接类型变体的唯一标识符。此名称在内部用于标识连接类型的特定变体。
+ `DisplayName` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  AWS Glue 控制台中显示的连接类型变体的人类可读名称。
+ `Description` – UTF-8 字符串，长度不超过 1024 个字节。

  连接类型变体的详细描述，包括其用途、用例和任何特定的配置要求。
+ `LogoUrl` – UTF-8 字符串。

  与连接类型变体关联的徽标的 URL。

## 数据类型
<a name="aws-glue-api-catalog-connections-connections-type-connection-types"></a>
+ [验证结构](#aws-glue-api-catalog-connections-connections-type-Validation)
+ [AuthConfiguration 结构](#aws-glue-api-catalog-connections-connections-type-AuthConfiguration)
+ [功能结构](#aws-glue-api-catalog-connections-connections-type-Capabilities)
+ [属性结构](#aws-glue-api-catalog-connections-connections-type-Property)
+ [AllowedValue 结构](#aws-glue-api-catalog-connections-connections-type-AllowedValue)
+ [ComputeEnvironmentConfiguration 结构](#aws-glue-api-catalog-connections-connections-type-ComputeEnvironmentConfiguration)

## 验证结构
<a name="aws-glue-api-catalog-connections-connections-type-Validation"></a>

定义如何对连接属性执行验证。

**Fields**
+ `ValidationType` – *必填：*UTF-8 字符串（有效值：`REGEX` \$1 `RANGE`）。

  要执行的验证类型，例如 `REGEX`。
+ `Patterns` – .

  适用于验证的模式列表。
+ `Description` – *必填项：*UTF-8 字符串，长度不少于 1 个字节，不超过 1024 个字节。

  验证的描述。
+ `MaxLength` – 数字（整数）。

  字符串连接属性的最大长度。
+ `Maximum` – 数字（整数）。

  指定 `RANGE` 类型验证时的最大值。
+ `Minimum` – 数字（整数）。

  指定 `RANGE` 类型验证时的最小值。

## AuthConfiguration 结构
<a name="aws-glue-api-catalog-connections-connections-type-AuthConfiguration"></a>

`DescribeConnectionType` API 返回的连接的身份验证配置。

**Fields**
+ `AuthenticationType` – *必填：*一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  连接的身份验证类型。
+ `SecretArn` – 一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  Secrets Manager 的 Amazon 资源名称 (ARN)。
+ `OAuth2Properties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  OAuth2 属性的键值对映射。每个值都是一个 `Property` 对象。
+ `BasicAuthenticationProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  OAuth2 属性的键值对映射。每个值都是一个 `Property` 对象。
+ `CustomAuthenticationProperties` – 键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  自定义身份验证属性的键值对映射。每个值都是一个 `Property` 对象。

## 功能结构
<a name="aws-glue-api-catalog-connections-connections-type-Capabilities"></a>

指定 `DescribeConnectionType` API 返回的支持的身份验证类型。

**Fields**
+ `SupportedAuthenticationTypes` – *必填*：UTF-8 字符串数组。

  支持的身份验证类型列表。
+ `SupportedDataOperations` – *必填*：UTF-8 字符串数组。

  支持的数据操作列表。
+ `SupportedComputeEnvironments` – *必填*：UTF-8 字符串数组。

  支持的计算环境列表。

## 属性结构
<a name="aws-glue-api-catalog-connections-connections-type-Property"></a>

定义计算环境的连接类型的对象。

**Fields**
+ `Name`：*必需：*UTF-8 字符串，长度不少于 1 个字节，不超过 128 个字节。

  属性的名称。
+ `Description`：*必需：*UTF-8 字符串，长度不超过 1024 个字节。

  属性的描述。
+ `Required` – *必填：*布尔值。

  指示属性是否为必需属性。
+ `PropertyTypes` – *必填*：UTF-8 字符串数组。

  描述属性的类型。
+ `AllowedValues` – [AllowedValue](#aws-glue-api-catalog-connections-connections-type-AllowedValue) 对象的数组。

  表示属性允许的值的 `AllowedValue` 对象列表。
+ `DataOperationScopes` – UTF-8 字符串数组。

  指示哪些数据操作适用于该属性。

## AllowedValue 结构
<a name="aws-glue-api-catalog-connections-connections-type-AllowedValue"></a>

表示属性允许的值的对象。

**Fields**
+ `Description` – UTF-8 字符串，长度不超过 1024 个字节。

  允许的值的描述。
+ `Value`：*必需：*UTF-8 字符串，长度不少于 1 个字节，不超过 128 个字节。

  属性允许的值。

## ComputeEnvironmentConfiguration 结构
<a name="aws-glue-api-catalog-connections-connections-type-ComputeEnvironmentConfiguration"></a>

包含 `DescribeConnectionType` API 返回的计算环境（如 Spark、Python 或 Athena）配置的对象。

**Fields**
+ `Name`：*必需：*UTF-8 字符串，长度不少于 1 个字节，不超过 128 个字节。

  计算环境配置的名称。
+ `Description`：*必需：*UTF-8 字符串，长度不超过 1024 个字节。

  计算环境的描述。
+ `ComputeEnvironment` – *必填：* UTF-8 字符串（有效值：`SPARK` \$1 `ATHENA` \$1 `PYTHON`）。

  计算环境的类型。
+ `SupportedAuthenticationTypes` – *必填*：UTF-8 字符串数组。

  计算环境支持的身份验证类型。
+ `ConnectionOptions` – *必填*：键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 [属性](#aws-glue-api-catalog-connections-connections-type-Property) 对象。

  用作计算环境的连接选项的参数。
+ `ConnectionPropertyNameOverrides` – *必填*：键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 128 个字节。

  计算环境的连接属性名称覆盖。
+ `ConnectionOptionNameOverrides` – *必填*：键值对的映射数组。

  每个键都是一个 UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节。

  每个值都是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 128 个字节。

  计算环境的连接选项名称覆盖。
+ `ConnectionPropertiesRequiredOverrides` – *必填：*。

  计算环境需要覆盖的连接属性。
+ `PhysicalConnectionPropertiesRequired` – 布尔值。

  指示计算环境是否需要 `PhysicalConnectionProperties`。

# 连接元数据和预览 API
<a name="aws-glue-api-catalog-connections-connections-metadata"></a>

以下连接 API 介绍了用于描述连接元数据的操作。

## 数据类型
<a name="aws-glue-api-catalog-connections-connections-metadata-objects"></a>
+ [元数据](#aws-glue-api-catalog-connections-connections-metadata-Entity)
+ [字段结构](#aws-glue-api-catalog-connections-connections-metadata-Field)

## 元数据
<a name="aws-glue-api-catalog-connections-connections-metadata-Entity"></a>

给定 `ConnectionType` 支持的实体。

**Fields**
+ `EntityName` – UTF-8 字符串。

  在 中，将实体命名为 。
+ `Label` – UTF-8 字符串。

  用于实体的标签。
+ `IsParentEntity` – 布尔值。

  一个布尔值，有助于确定是否有可以列出的子对象。
+ `Description` – UTF-8 字符串。

  实体的描述。
+ `Category` – UTF-8 字符串。

  响应中存在的实体的类型。此值取决于源连接。例如，对于 Salesforce，这为 `SObjects`，对于 Amazon Redshift 等来源，这为 `databases`、`schemas` 或 `tables`。
+ `CustomProperties` – 

  连接器可为实体返回的可选键映射。

## 字段结构
<a name="aws-glue-api-catalog-connections-connections-metadata-Field"></a>

`Field` 对象包含与连接器中的某字段关联的不同属性的信息。

**Fields**
+ `FieldName` – UTF-8 字符串。

  字段的唯一标识符。
+ `Label` – UTF-8 字符串。

  用于该字段的可读标签。
+ `Description` – UTF-8 字符串。

  字段的描述。
+ `FieldType`：UTF-8 字符串（有效值：`INT` \$1 `SMALLINT` \$1 `BIGINT` \$1 `FLOAT` \$1 `LONG` \$1 `DATE` \$1 `BOOLEAN` \$1 `MAP` \$1 `ARRAY` \$1 `STRING` \$1 `TIMESTAMP` \$1 `DECIMAL` \$1 `BYTE` \$1 `SHORT` \$1 `DOUBLE` \$1 `STRUCT`）。

  字段中的数据类型。
+ `IsPrimaryKey` – 布尔值。

  指示此字段是否可用作给定实体的主键。
+ `IsNullable` – 布尔值。

  指示此字段是否可以为空。
+ `IsRetrievable` – 布尔值。

  指示此字段是否可以添加到 SQL 查询的 Select 子句中或者是否可以检索。
+ `IsFilterable` – 布尔值。

   指示在查询数据时是否可以在 SQL 语句的筛选条件子句（`WHERE` 子句）中使用此字段。
+ `IsPartitionable` – 布尔值。

  指示是否可以使用给定字段对向 SaaS 进行的查询进行分区。
+ `IsCreateable` – 布尔值。

  指示此字段是否可以作为目标写入的一部分创建。
+ `IsUpdateable` – 布尔值。

  指示此字段是否可以作为目标写入的一部分更新。
+ `IsUpsertable` – 布尔值。

  指示此字段是否可以作为目标写入的一部分更新插入。
+ `IsDefaultOnCreate` – 布尔值。

  指示在创建对象时（例如在时间戳时创建的）是否自动填充此字段。
+ `SupportedValues` – .

  该字段支持的值的列表。
+ `SupportedFilterOperators` – UTF-8 字符串数组。

  指示此字段的支持筛选运算符。
+ `CustomProperties` – 

  可能返回的可选键映射。

## 操作
<a name="aws-glue-api-catalog-connections-connections-metadata-actions"></a>
+ [ListEntities 操作（Python：list\$1entities）](#aws-glue-api-catalog-connections-connections-metadata-ListEntities)
+ [DescribeEntity 操作（Python：describe\$1entity)](#aws-glue-api-catalog-connections-connections-metadata-DescribeEntity)
+ [GetEntityRecords 操作（Python：get\$1entity\$1records）](#aws-glue-api-catalog-connections-connections-metadata-GetEntityRecords)

## ListEntities 操作（Python：list\$1entities）
<a name="aws-glue-api-catalog-connections-connections-metadata-ListEntities"></a>

返回连接类型支持的可用实体。

**请求**
+ `ConnectionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  具有查询任何连接类型所需凭证的连接的名称。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含连接的目录的目录 ID。这可以为空，默认情况下，AWS 账户 ID 就是目录 ID。
+ `ParentEntityName` – UTF-8 字符串。

  您想要列出子项的父实体的名称。此参数采用实体的完全限定路径来列出子实体。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续标记 (如果这是延续调用，则包括)。
+ `DataStoreApiVersion` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #23](aws-glue-api-common.md#regex_23) 匹配。

  SaaS 连接器的 API 版本。

**响应**
+ `Entities` – [实体](#aws-glue-api-catalog-connections-connections-metadata-Entity) 对象的数组。

  `Entity` 对象的列表。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续令牌，如果当前片段不是最后一个片段则呈现。

**错误**
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `GlueEncryptionException`
+ `ValidationException`
+ `FederationSourceException`
+ `AccessDeniedException`

## DescribeEntity 操作（Python：describe\$1entity)
<a name="aws-glue-api-catalog-connections-connections-metadata-DescribeEntity"></a>

提供有关连接类型所使用的实体的详细信息以及所选实体中每个字段的数据模型的描述。

 响应包括构成实体的所有字段。

**请求**
+ `ConnectionName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含连接类型凭证的连接的名称。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含连接的目录的目录 ID。这可以为空，默认情况下，AWS 账户 ID 就是目录 ID。
+ `EntityName` – *必填：*UTF-8 字符串。

  您想要从连接类型描述的实体的名称。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续标记 (如果这是延续调用，则包括)。
+ `DataStoreApiVersion` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #23](aws-glue-api-common.md#regex_23) 匹配。

  用于数据存储的 API 版本。

**响应**
+ `Fields` – [字段](#aws-glue-api-catalog-connections-connections-metadata-Field) 对象的数组。

  描述该连接器实体的字段。这是 `Field` 对象的列表。`Field` 与数据库中的列非常相似。`Field` 对象包含与连接器中的字段关联的不同属性的信息。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续令牌，如果当前片段不是最后一个片段则呈现。

**错误**
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `GlueEncryptionException`
+ `ValidationException`
+ `FederationSourceException`
+ `AccessDeniedException`

## GetEntityRecords 操作（Python：get\$1entity\$1records）
<a name="aws-glue-api-catalog-connections-connections-metadata-GetEntityRecords"></a>

此 API 用于从给定的连接类型或基于 Amazon S3 的原生 AWS Glue Data Catalog 查询预览数据。

以 JSON blob 数组的形式返回记录。每条记录都使用 Jackson JsonNode 根据 `DescribeEntity` API 定义的字段类型进行格式化。

Spark 连接器根据与 `DescribeEntity` API 中相同的数据类型映射生成架构。Spark 连接器在返回行时会将数据转换为与架构匹配的适当数据类型。

**请求**
+ `ConnectionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含连接类型凭证的连接的名称。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含连接的目录的目录 ID。这可以为空，默认情况下，AWS 账户 ID 就是目录 ID。
+ `EntityName` – *必填：*UTF-8 字符串。

  我们想要从给定的连接类型查询预览数据的实体的名称。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续标记 (如果这是延续调用，则包括)。
+ `DataStoreApiVersion` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #23](aws-glue-api-common.md#regex_23) 匹配。

  SaaS 连接器的 API 版本。
+ `ConnectionOptions` – 键值对的映射数组，不超过 100 对。

  每个键是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 256 个字节，与 [Custom string pattern #18](aws-glue-api-common.md#regex_18) 匹配。

  每个值是一个 UTF-8 字符串，长度不少于 1 个字节，不超过 256 个字节，与 [Custom string pattern #17](aws-glue-api-common.md#regex_17) 匹配。

  查询数据所需的连接器选项。
+ `FilterPredicate`：UTF-8 字符串，长度不少于 1 个字节，不超过 100000 个字节。

  您可以在查询请求中应用的筛选谓词。
+ `Limit`：*必需：*数字（长度），不少于 1 或不超过 1000。

  限制通过请求提取的记录数。
+ `SelectedFields`：UTF-8 字符串数组，不少于 1 个字符串，不超过 1000 个字符串。

   我们想要作为预览数据的一部分提取的字段列表。

**响应**
+ `Records` – 结构数组。

  请求的 对象的列表。
+ `NextToken` – UTF-8 字符串，不少于 1 个字节或超过 2048 个字节，与 [Custom string pattern #11](aws-glue-api-common.md#regex_11) 匹配。

  延续令牌，如果当前片段不是最后一个片段则呈现。

**错误**
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `InvalidInputException`
+ `GlueEncryptionException`
+ `ValidationException`
+ `FederationSourceException`
+ `AccessDeniedException`

# 用户定义的函数 API
<a name="aws-glue-api-catalog-functions"></a>

用户定义的函数 API 介绍用于处理函数的 AWS Glue 数据类型和操作。

## 数据类型
<a name="aws-glue-api-catalog-functions-objects"></a>
+ [UserDefinedFunction 结构](#aws-glue-api-catalog-functions-UserDefinedFunction)
+ [UserDefinedFunctionInput 结构](#aws-glue-api-catalog-functions-UserDefinedFunctionInput)

## UserDefinedFunction 结构
<a name="aws-glue-api-catalog-functions-UserDefinedFunction"></a>

表示与 Hive 用户定义函数 (`UDF`) 定义等效的函数。

**字段**
+ `FunctionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数的名称。
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含函数的目录数据库的名称。
+ `ClassName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含函数代码的 Java 类。
+ `OwnerName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  参数的所有者。
+ `OwnerType` – UTF-8 字符串（有效值：`USER` \$1 `ROLE` \$1 `GROUP`）。

  所有者类型。
+ `CreateTime` – 时间戳。

  创建函数的时间。
+ `ResourceUris` – [ResourceUri](aws-glue-api-common.md#aws-glue-api-common-ResourceUri) 对象数组，不超过 1000 个结构。

  函数的资源 URI。
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建函数的数据目录的 ID。

## UserDefinedFunctionInput 结构
<a name="aws-glue-api-catalog-functions-UserDefinedFunctionInput"></a>

用于创建或更新用户定义函数的结构。

**字段**
+ `FunctionName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数的名称。
+ `ClassName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  包含函数代码的 Java 类。
+ `OwnerName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  参数的所有者。
+ `OwnerType` – UTF-8 字符串（有效值：`USER` \$1 `ROLE` \$1 `GROUP`）。

  所有者类型。
+ `ResourceUris` – [ResourceUri](aws-glue-api-common.md#aws-glue-api-common-ResourceUri) 对象数组，不超过 1000 个结构。

  函数的资源 URI。

## 操作
<a name="aws-glue-api-catalog-functions-actions"></a>
+ [CreateUserDefinedFunction 操作（Python：create\$1user\$1defined\$1function）](#aws-glue-api-catalog-functions-CreateUserDefinedFunction)
+ [UpdateUserDefinedFunction 操作（Python：update\$1user\$1defined\$1function）](#aws-glue-api-catalog-functions-UpdateUserDefinedFunction)
+ [DeleteUserDefinedFunction 操作（Python：delete\$1user\$1defined\$1function）](#aws-glue-api-catalog-functions-DeleteUserDefinedFunction)
+ [GetUserDefinedFunction 操作（Python：get\$1user\$1defined\$1function）](#aws-glue-api-catalog-functions-GetUserDefinedFunction)
+ [GetUserDefinedFunctions 操作（Python：get\$1user\$1defined\$1functions）](#aws-glue-api-catalog-functions-GetUserDefinedFunctions)

## CreateUserDefinedFunction 操作（Python：create\$1user\$1defined\$1function）
<a name="aws-glue-api-catalog-functions-CreateUserDefinedFunction"></a>

在数据目录中创建新函数定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建函数的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要在其中创建函数的目录数据库的名称。
+ `FunctionInput` – *必填：*一个 [UserDefinedFunctionInput](#aws-glue-api-catalog-functions-UserDefinedFunctionInput) 对象。

  一个 `FunctionInput` 对象，它定义要在数据目录中创建的函数。

**响应**
+ *无响应参数。*

**错误**
+ `AlreadyExistsException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `EntityNotFoundException`
+ `OperationTimeoutException`
+ `ResourceNumberLimitExceededException`
+ `GlueEncryptionException`

## UpdateUserDefinedFunction 操作（Python：update\$1user\$1defined\$1function）
<a name="aws-glue-api-catalog-functions-UpdateUserDefinedFunction"></a>

在数据目录中更新现有函数定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要更新的函数所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要更新的函数所在的目录数据库的名称。
+ `FunctionName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数的名称。
+ `FunctionInput` – *必填：*一个 [UserDefinedFunctionInput](#aws-glue-api-catalog-functions-UserDefinedFunctionInput) 对象。

  一个 `FunctionInput` 对象，它重新定义数据目录中的函数。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## DeleteUserDefinedFunction 操作（Python：delete\$1user\$1defined\$1function）
<a name="aws-glue-api-catalog-functions-DeleteUserDefinedFunction"></a>

从数据目录中删除现有函数定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的函数所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数所在的目录数据库的名称。
+ `FunctionName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要删除的函数定义的名称。

**响应**
+ *无响应参数。*

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`

## GetUserDefinedFunction 操作（Python：get\$1user\$1defined\$1function）
<a name="aws-glue-api-catalog-functions-GetUserDefinedFunction"></a>

从数据目录中检索指定的函数定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要检索的函数所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数所在的目录数据库的名称。
+ `FunctionName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数的名称。

**响应**
+ `UserDefinedFunction` – 一个 [UserDefinedFunction](#aws-glue-api-catalog-functions-UserDefinedFunction) 对象。

  请求的函数定义。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`
+ `GlueEncryptionException`

## GetUserDefinedFunctions 操作（Python：get\$1user\$1defined\$1functions）
<a name="aws-glue-api-catalog-functions-GetUserDefinedFunctions"></a>

从数据目录中检索多个函数定义。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要检索的函数所在的数据目录的 ID。如果没有提供，则默认情况下使用 AWS 账户 ID。
+ `DatabaseName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  函数所在的目录数据库的名称。如果未提供任何内容，则将返回来自目录中所有数据库的函数。
+ `Pattern` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  一个可选的函数名称模式字符串，用于筛选返回的函数定义。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  要在一个响应中返回的函数的最大数量。

**响应**
+ `UserDefinedFunctions` – [UserDefinedFunction](#aws-glue-api-catalog-functions-UserDefinedFunction) 对象的数组。

  请求的函数定义的列表。
+ `NextToken` – UTF-8 字符串。

  延续令牌 (如果返回函数的列表不包括最后一个请求的函数)。

**错误**
+ `EntityNotFoundException`
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `InternalServiceException`
+ `GlueEncryptionException`

# 将 Athena 目录导入 AWS Glue
<a name="aws-glue-api-catalog-migration"></a>

迁移 API 介绍与将 Athena 数据目录迁移到 AWS Glue 有关的 AWS Glue 数据类型和操作。

## 数据类型
<a name="aws-glue-api-catalog-migration-objects"></a>
+ [CatalogImportStatus 结构](#aws-glue-api-catalog-migration-CatalogImportStatus)

## CatalogImportStatus 结构
<a name="aws-glue-api-catalog-migration-CatalogImportStatus"></a>

包含迁移状态信息的结构。

**字段**
+ `ImportCompleted` – 布尔值。

  如果迁移已完成，则为 `True`，否则为 `False`。
+ `ImportTime` – 时间戳。

  启动迁移的时间。
+ `ImportedBy` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  启动迁移的人员的姓名。

## 操作
<a name="aws-glue-api-catalog-migration-actions"></a>
+ [ImportCatalogToGlue 操作（Python：import\$1catalog\$1to\$1glue）](#aws-glue-api-catalog-migration-ImportCatalogToGlue)
+ [GetCatalogImportStatus 操作（Python：get\$1catalog\$1import\$1status）](#aws-glue-api-catalog-migration-GetCatalogImportStatus)

## ImportCatalogToGlue 操作（Python：import\$1catalog\$1to\$1glue）
<a name="aws-glue-api-catalog-migration-ImportCatalogToGlue"></a>

将现有的 Amazon Athena 数据目录导入到 AWS Glue。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要导入的目录的 ID。目前，它应该为 AWS 账户 ID。

**响应**
+ *无响应参数。*

**错误**
+ `InternalServiceException`
+ `OperationTimeoutException`

## GetCatalogImportStatus 操作（Python：get\$1catalog\$1import\$1status）
<a name="aws-glue-api-catalog-migration-GetCatalogImportStatus"></a>

检索迁移操作的状态。

**请求**
+ `CatalogId` – 目录 id 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) 匹配。

  要迁移的目录的 ID。目前，它应该为 AWS 账户 ID。

**响应**
+ `ImportStatus` – 一个 [CatalogImportStatus](#aws-glue-api-catalog-migration-CatalogImportStatus) 对象。

  指定目录迁移的状态。

**错误**
+ `InternalServiceException`
+ `OperationTimeoutException`