

# 将 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`