

# 架构注册表
<a name="aws-glue-api-schema-registry-api"></a>

架构注册表 API 介绍与使用 AWS Glue 中的架构相关的数据类型和 API。

## 数据类型
<a name="aws-glue-api-schema-registry-api-objects"></a>
+ [RegistryId 结构](#aws-glue-api-schema-registry-api-RegistryId)
+ [RegistryListItem 结构](#aws-glue-api-schema-registry-api-RegistryListItem)
+ [MetadataInfo 结构](#aws-glue-api-schema-registry-api-MetadataInfo)
+ [OtherMetadataValueListItem 结构](#aws-glue-api-schema-registry-api-OtherMetadataValueListItem)
+ [SchemaListItem 结构](#aws-glue-api-schema-registry-api-SchemaListItem)
+ [SchemaVersionListItem 结构](#aws-glue-api-schema-registry-api-SchemaVersionListItem)
+ [MetadataKeyValuePair 结构](#aws-glue-api-schema-registry-api-MetadataKeyValuePair)
+ [SchemaVersionErrorItem 结构](#aws-glue-api-schema-registry-api-SchemaVersionErrorItem)
+ [ErrorDetails 结构](#aws-glue-api-schema-registry-api-ErrorDetails)
+ [SchemaVersionNumber 结构](#aws-glue-api-schema-registry-api-SchemaVersionNumber)
+ [SchemaId 结构](#aws-glue-api-schema-registry-api-SchemaId)

## RegistryId 结构
<a name="aws-glue-api-schema-registry-api-RegistryId"></a>

包装结构，包含注册表名称和 Amazon Resource Name（ARN）。

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

  注册表的名称。仅用于查找。必须提供 `RegistryArn` 或 `RegistryName` 中的一个。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  要更新的注册表的 ARN。必须提供 `RegistryArn` 或 `RegistryName` 中的一个。

## RegistryListItem 结构
<a name="aws-glue-api-schema-registry-api-RegistryListItem"></a>

包含注册表详细信息的结构。

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

  注册表的名称。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  注册表的 Amazon Resource Name（ARN）。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  注册表的描述。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`DELETING` ）。

  注册表的状态。
+ `CreatedTime` – UTF-8 字符串。

  注册表创建的数据。
+ `UpdatedTime` – UTF-8 字符串。

  注册表更新的日期。

## MetadataInfo 结构
<a name="aws-glue-api-schema-registry-api-MetadataInfo"></a>

包含用于架构版本的元数据信息的结构。

**Fields**
+ `MetadataValue` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键的相应值。
+ `CreatedTime` – UTF-8 字符串。

  创建条目的时间。
+ `OtherMetadataValueList` – [OtherMetadataValueListItem](#aws-glue-api-schema-registry-api-OtherMetadataValueListItem) 对象的数组。

  属于同一元数据键的其他元数据。

## OtherMetadataValueListItem 结构
<a name="aws-glue-api-schema-registry-api-OtherMetadataValueListItem"></a>

包含属于同一元数据键用于架构版本的其他元数据的结构。

**Fields**
+ `MetadataValue` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键的其他元数据的相应值属于同一元数据键。
+ `CreatedTime` – UTF-8 字符串。

  创建条目的时间。

## SchemaListItem 结构
<a name="aws-glue-api-schema-registry-api-SchemaListItem"></a>

包含架构的最小详细信息的对象。

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

  架构所在的注册表的名称。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  架构描述。
+ `SchemaStatus` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`DELETING` ）。

  架构的状态。
+ `CreatedTime` – UTF-8 字符串。

  架构的创建日期和时间。
+ `UpdatedTime` – UTF-8 字符串。

  架构的更新日期和时间。

## SchemaVersionListItem 结构
<a name="aws-glue-api-schema-registry-api-SchemaVersionListItem"></a>

包含有关架构版本的详细信息的对象。

**Fields**
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的唯一标识符。
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`FAILURE` \$1`DELETING` ）。

  架构版本的状态。
+ `CreatedTime` – UTF-8 字符串。

  此架构版本的创建日期和时间。

## MetadataKeyValuePair 结构
<a name="aws-glue-api-schema-registry-api-MetadataKeyValuePair"></a>

包含元数据键值对的结构。

**Fields**
+ `MetadataKey` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键
+ `MetadataValue` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键的相应值。

## SchemaVersionErrorItem 结构
<a name="aws-glue-api-schema-registry-api-SchemaVersionErrorItem"></a>

包含架构版本操作错误详细信息的对象。

**Fields**
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。
+ `ErrorDetails` – 一个 [ErrorDetails](#aws-glue-api-schema-registry-api-ErrorDetails) 对象。

  架构版本的错误的详细信息。

## ErrorDetails 结构
<a name="aws-glue-api-schema-registry-api-ErrorDetails"></a>

包含错误详细信息的对象。

**Fields**
+ `ErrorCode` – UTF-8 字符串。

  错误的错误代码。
+ `ErrorMessage` – UTF-8 字符串。

  错误的错误消息。

## SchemaVersionNumber 结构
<a name="aws-glue-api-schema-registry-api-SchemaVersionNumber"></a>

包含架构版本信息的结构。

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

  可用于架构的最新版本。
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。

## SchemaId 结构
<a name="aws-glue-api-schema-registry-api-SchemaId"></a>

AWS Glue 架构注册表中的架构的唯一 ID。

**Fields**
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  包含该架构的架构注册表的名称。

## 操作
<a name="aws-glue-api-schema-registry-api-actions"></a>
+ [CreateRegistry 操作（Python：create\$1registry）](#aws-glue-api-schema-registry-api-CreateRegistry)
+ [CreateSchema 操作（Python：create\$1schema）](#aws-glue-api-schema-registry-api-CreateSchema)
+ [GetSchema 操作（Python：get\$1schema）](#aws-glue-api-schema-registry-api-GetSchema)
+ [ListSchemaVersions 操作（Python：list\$1schema \$1version）](#aws-glue-api-schema-registry-api-ListSchemaVersions)
+ [GetSchemaVersion 操作（Python：get\$1table\$1version）](#aws-glue-api-schema-registry-api-GetSchemaVersion)
+ [GetSchemaVersionsDiff 操作（Python：get\$1schema\$1versions\$1diff）](#aws-glue-api-schema-registry-api-GetSchemaVersionsDiff)
+ [ListRegistries 操作（Python：list\$1registries）](#aws-glue-api-schema-registry-api-ListRegistries)
+ [ListSchemas 操作（Python：list\$1schema）](#aws-glue-api-schema-registry-api-ListSchemas)
+ [RegisterSchemaVersion 操作（Python：register\$1schema\$1version）](#aws-glue-api-schema-registry-api-RegisterSchemaVersion)
+ [UpdateSchema 操作（Python：update\$1schema）](#aws-glue-api-schema-registry-api-UpdateSchema)
+ [CheckSchemaVersionValidity 操作（Python：check\$1schema\$1version\$1validity）](#aws-glue-api-schema-registry-api-CheckSchemaVersionValidity)
+ [UpdateRegistry 操作（Python：update\$1registry）](#aws-glue-api-schema-registry-api-UpdateRegistry)
+ [GetSchemaByDefinition 操作（Python：get\$1schema\$1by\$1definition）](#aws-glue-api-schema-registry-api-GetSchemaByDefinition)
+ [GetRegistry 操作（Python：get\$1registry）](#aws-glue-api-schema-registry-api-GetRegistry)
+ [PutSchemaVersionMetadata 操作（Python：put\$1schema\$1version\$1metadata）](#aws-glue-api-schema-registry-api-PutSchemaVersionMetadata)
+ [QuerySchemaVersionMetadata 操作（Python：query\$1schema\$1version\$1metadata）](#aws-glue-api-schema-registry-api-QuerySchemaVersionMetadata)
+ [RemoveSchemaVersionMetadata 操作（Python：remove\$1schema\$1version\$1metadata）](#aws-glue-api-schema-registry-api-RemoveSchemaVersionMetadata)
+ [DeleteRegistry 操作（Python：delete\$1registry）](#aws-glue-api-schema-registry-api-DeleteRegistry)
+ [DeleteSchema 操作（Python：delete\$1schema）](#aws-glue-api-schema-registry-api-DeleteSchema)
+ [DeleteSchemaVersions 操作（Python：delete\$1table\$1version）](#aws-glue-api-schema-registry-api-DeleteSchemaVersions)

## CreateRegistry 操作（Python：create\$1registry）
<a name="aws-glue-api-schema-registry-api-CreateRegistry"></a>

创建可用于保存架构集合的新注册表。

**请求**
+ `RegistryName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  要创建的注册表的名称，其最大长度不得超过 255 个字符，且只能包含字母、数字、连字符、下划线、美元符号或哈希标记。无空格。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  注册表的描述。如果未提供描述，则不会有任何默认值。
+ `Tags` – 键值对的映射数组，不超过 50 对。

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

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

  AWS 标签，其中包含键值对，并可以通过控制台、命令行或 API 进行搜索。

**响应**
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  服务注册表的 Amazon Resource Name（ARN）。
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

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

  注册表的描述。
+ `Tags` – 键值对的映射数组，不超过 50 对。

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

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

  注册表的标签。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `AlreadyExistsException`
+ `ResourceNumberLimitExceededException`
+ `ConcurrentModificationException`
+ `ThrottlingException`
+ `InternalServiceException`

## CreateSchema 操作（Python：create\$1schema）
<a name="aws-glue-api-schema-registry-api-CreateSchema"></a>

创建新的架构集并注册架构定义。如果架构集已经存在，但没有实际注册版本，则返回错误。

创建架构集时，版本检查点将设置为第一个版本。兼容模式“DISABLED”限制在第一个架构版本之后添加任何其他架构版本。对于所有其他兼容模式，在使用 `RegisterSchemaVersion` API 时，兼容性设置的验证将仅从第二个版本开始应用。

当不使用 `RegistryId` 调用此 API 时，这将为注册表数据库表中的“default-registry”创建一个条目（如果它尚未存在）。

**请求**
+ `RegistryId` – 一个 [RegistryId](#aws-glue-api-schema-registry-api-RegistryId) 对象。

   这是包含注册表标识字段的包装形状。如果未提供此选项，则会使用默认的注册表。相同的 ARN 格式为：`arn:aws:glue:us-east-2:<customer id>:registry/default-registry:random-5-letter-id`。
+ `SchemaName` – *必填：*UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  要创建的架构的名称，其最大长度不得超过 255 个字符，且只能包含字母、数字、连字符、下划线、美元符号或哈希标记。无空格。
+ `DataFormat` – *必填：* UTF-8 字符串（有效值：`AVRO` \$1 `JSON` \$1 `PROTOBUF`）。

  架构定义的数据格式。目前支持 `AVRO`、`JSON` 和 `PROTOBUF`。
+ `Compatibility` – UTF-8 字符串（有效值：`NONE` \$1`DISABLED` \$1`BACKWARD` \$1`BACKWARD_ALL` \$1`FORWARD` \$1`FORWARD_ALL` \$1`FULL` \$1`FULL_ALL` ）。

  架构的兼容模式。可能的值包括：
  +  *NONE*：不适用兼容模式。您可以在开发场景或者在不知道要应用于架构的兼容性模式时使用此选项。无需进行兼容性检查，接受添加的任何新版本。
  +  *DISABLED*：此兼容性选项可防止对特定架构进行版本控制。您可以使用此选项来防止将来对架构进行版本控制。
  +  *BACKWARD*：建议使用此兼容性选项，因为它允许数据接收器读取架构的最新版本和上一个版本。这意味着，例如，新架构版本不能删除数据字段或更改这些字段的类型，因此使用先前版本的读取器无法读取这些字段。
  +  *BACKWARD\$1ALL*：此兼容性选项允许数据接收器读取架构的最新版本和所有先前版本。当您需要删除字段或添加可选字段以及检查所有先前架构版本的兼容性时，您可以使用此选项。
  +  *FORWARD*：此兼容性选项允许数据接收器读取当前和下一个架构版本，但不一定是更高版本。当您需要添加字段或删除可选字段，但仅检查上一个架构版本的兼容性时，您可以使用此选项。
  +  *FORWARD\$1ALL*：此兼容性选项允许数据接收器读取任何新的注册架构的创建器写入。当您需要添加字段或删除可选字段以及检查所有先前架构版本的兼容性时，您可以使用此选项。
  +  *FULL*：此兼容性选项允许数据接收器读取使用先前版本或下一版本的架构，但不一定是早期版本或更高版本的创建器写入的数据。当您需要添加或删除可选字段，但仅检查上一个架构版本的兼容性时，您可以使用此选项。
  +  *FULL\$1ALL*：此兼容性选项允许数据接收器读取使用所有架构先前版本的创建器写入的数据。当您需要添加或删除可选字段以及检查所有先前架构版本的兼容性时，您可以使用此选项。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  架构的描述（可选）。如果未提供描述，则不会有自动任何默认值。
+ `Tags` – 键值对的映射数组，不超过 50 对。

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

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

  AWS 标签，其中包含键值对，并可以通过控制台、命令行或 API 进行搜索。如果指定，请遵循 AWS tags-on-create 模式。
+ `SchemaDefinition` – UTF-8 字符串，长度不少于 1 个字节或超过 170000 个字节，与 [Custom string pattern #13](aws-glue-api-common.md#regex_13) 匹配。

  使用 `DataFormat` 设置 `SchemaName` 的架构定义。

**响应**
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  注册表的名称。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  注册表的 Amazon Resource Name（ARN）。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  对架构（如果在创建时指定）的描述。
+ `DataFormat` – UTF-8 字符串（有效值：`AVRO` \$1`JSON` \$1`PROTOBUF` ）。

  架构定义的数据格式。目前支持 `AVRO`、`JSON` 和 `PROTOBUF`。
+ `Compatibility` – UTF-8 字符串（有效值：`NONE` \$1`DISABLED` \$1`BACKWARD` \$1`BACKWARD_ALL` \$1`FORWARD` \$1`FORWARD_ALL` \$1`FULL` \$1`FULL_ALL` ）。

  架构的兼容模式。
+ `SchemaCheckpoint` – 数字（长度），不小于 1 或大于 100000。

  检查点的版本号（上次更改兼容模式时）。
+ `LatestSchemaVersion` – 数字（长度），不小于 1 或大于 100000。

  与返回的架构定义相关联的架构的最新版本。
+ `NextSchemaVersion` – 数字（长度），不小于 1 或大于 100000。

  与返回的架构定义相关联的架构的下一个版本。
+ `SchemaStatus` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`DELETING` ）。

  架构的状态。
+ `Tags` – 键值对的映射数组，不超过 50 对。

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

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

  架构的标签。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  第一个架构版本的唯一标识符。
+ `SchemaVersionStatus` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`FAILURE` \$1`DELETING` ）。

  所创建的第一个架构版本的状态。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `AlreadyExistsException`
+ `ResourceNumberLimitExceededException`
+ `ConcurrentModificationException`
+ `ThrottlingException`
+ `InternalServiceException`

## GetSchema 操作（Python：get\$1schema）
<a name="aws-glue-api-schema-registry-api-GetSchema"></a>

详细描述指定的架构。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。

**响应**
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  注册表的名称。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  注册表的 Amazon Resource Name（ARN）。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  对架构（如果在创建时指定）的描述。
+ `DataFormat` – UTF-8 字符串（有效值：`AVRO` \$1`JSON` \$1`PROTOBUF` ）。

  架构定义的数据格式。目前支持 `AVRO`、`JSON` 和 `PROTOBUF`。
+ `Compatibility` – UTF-8 字符串（有效值：`NONE` \$1`DISABLED` \$1`BACKWARD` \$1`BACKWARD_ALL` \$1`FORWARD` \$1`FORWARD_ALL` \$1`FULL` \$1`FULL_ALL` ）。

  架构的兼容模式。
+ `SchemaCheckpoint` – 数字（长度），不小于 1 或大于 100000。

  检查点的版本号（上次更改兼容模式时）。
+ `LatestSchemaVersion` – 数字（长度），不小于 1 或大于 100000。

  与返回的架构定义相关联的架构的最新版本。
+ `NextSchemaVersion` – 数字（长度），不小于 1 或大于 100000。

  与返回的架构定义相关联的架构的下一个版本。
+ `SchemaStatus` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`DELETING` ）。

  架构的状态。
+ `CreatedTime` – UTF-8 字符串。

  架构的创建日期和时间。
+ `UpdatedTime` – UTF-8 字符串。

  架构的更新日期和时间。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `InternalServiceException`

## ListSchemaVersions 操作（Python：list\$1schema \$1version）
<a name="aws-glue-api-schema-registry-api-ListSchemaVersions"></a>

返回已创建的架构版本列表，其中包含最少信息。结果中将不会包含处于已删除状态的架构版本。如果没有可用的架构版本，则返回空白结果。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  每页所需的最大结果数量。如果未提供该值，则每页默认最大数量为 25。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。

**响应**
+ `Schemas` – [SchemaVersionListItem](#aws-glue-api-schema-registry-api-SchemaVersionListItem) 对象的数组。

  `SchemaVersionList` 对象的数组，包含每个架构版本的详细信息。
+ `NextToken` – UTF-8 字符串。

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

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `InternalServiceException`

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

通过在创建或注册架构版本时分配的唯一 ID 获取指定架构。结果中将不会包含处于已删除状态的架构版本。

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

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的 `SchemaVersionId`。此字段是按架构 ID 进行读取的必填字段。必须提供此字段或 `SchemaId` 包装。
+ `SchemaVersionNumber` – 一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  架构的版本号。

**响应**
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的 `SchemaVersionId`。
+ `SchemaDefinition` – UTF-8 字符串，长度不少于 1 个字节或超过 170000 个字节，与 [Custom string pattern #13](aws-glue-api-common.md#regex_13) 匹配。

  架构 ID 的架构定义。
+ `DataFormat` – UTF-8 字符串（有效值：`AVRO` \$1`JSON` \$1`PROTOBUF` ）。

  架构定义的数据格式。目前支持 `AVRO`、`JSON` 和 `PROTOBUF`。
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`FAILURE` \$1`DELETING` ）。

  架构版本的状态。
+ `CreatedTime` – UTF-8 字符串。

  此架构版本的创建日期和时间。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `InternalServiceException`

## GetSchemaVersionsDiff 操作（Python：get\$1schema\$1versions\$1diff）
<a name="aws-glue-api-schema-registry-api-GetSchemaVersionsDiff"></a>

获取架构注册表中两个存储架构版本之间指定差异类型的架构版本差异。

此 API 允许您比较同一架构下的两个架构定义之间的两个架构版本。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
+ `FirstSchemaVersionNumber` – *必填：*一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  要比较的两个架构版本中的第一个版本。
+ `SecondSchemaVersionNumber` – *必填：*一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  要比较的两个架构版本中的第二个版本。
+ `SchemaDiffType` – *必填*：UTF-8 字符串（有效值：`SYNTAX_DIFF`）。

  指的是 `SYNTAX_DIFF`，这是当前支持的差异类型。

**响应**
+ `Diff` – UTF-8 字符串，长度不少于 1 个字节或超过 340000 个字节，与 [Custom string pattern #13](aws-glue-api-common.md#regex_13) 匹配。

  架构之间的差异以字符串的形式在 JSONPatch 格式中输出。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `InternalServiceException`

## ListRegistries 操作（Python：list\$1registries）
<a name="aws-glue-api-schema-registry-api-ListRegistries"></a>

返回您已创建的注册表列表，其中包含最少的注册表信息。结果中将不会包含处于 `Deleting` 状态的注册表。如果没有可用的注册表，将返回空白结果。

**请求**
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  每页所需的最大结果数量。如果未提供该值，则每页默认最大数量为 25。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。

**响应**
+ `Registries` – [RegistryListItem](#aws-glue-api-schema-registry-api-RegistryListItem) 对象的数组。

  `RegistryDetailedListItem` 对象的数组，其中包含每个注册表的最少详细信息。
+ `NextToken` – UTF-8 字符串。

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

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `InternalServiceException`

## ListSchemas 操作（Python：list\$1schema）
<a name="aws-glue-api-schema-registry-api-ListSchemas"></a>

返回具有最少详细信息的架构列表。结果中将不会包含处于 Deleting (正在删除) 状态的架构。如果没有可用的架构，则返回空白结果。

未提供 `RegistryId` 时，跨注册表的所有架构都将成为 API 响应的一部分。

**请求**
+ `RegistryId` – 一个 [RegistryId](#aws-glue-api-schema-registry-api-RegistryId) 对象。

  包装结构，包含注册表名称和 Amazon Resource Name（ARN）。
+ `MaxResults` – 数字（整数），不小于 1 或大于 100。

  每页所需的最大结果数量。如果未提供该值，则每页默认最大数量为 25。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。

**响应**
+ `Schemas` – [SchemaListItem](#aws-glue-api-schema-registry-api-SchemaListItem) 对象的数组。

  `SchemaListItem` 对象数组，包含每个架构的详细信息。
+ `NextToken` – UTF-8 字符串。

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

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `InternalServiceException`

## RegisterSchemaVersion 操作（Python：register\$1schema\$1version）
<a name="aws-glue-api-schema-registry-api-RegisterSchemaVersion"></a>

将新版本添加到现有架构。如果新版本的架构不符合架构集的兼容性要求，则返回错误。如果架构集尚未存在于架构注册表中，此 API 将不会创建新的架构集，并返回 404 错误。

如果是要在架构注册表中注册的第一个架构定义，则此 API 将存储架构版本并立即返回。否则，由于兼容模式，此调用可能会比其他操作运行时间长。您可以调用带有 `SchemaVersionId` 的 `GetSchemaVersion` API 来检查兼容性模式。

如果同一架构定义已作为版本存储在架构注册表中，则现有架构的架构 ID 将返回给调用方。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn`，或者 `SchemaName` 和 `RegistryName`。
+ `SchemaDefinition` – *必填*：UTF-8 字符串，长度不少于 1 个字节或超过 170000 个字节，与 [Custom string pattern #13](aws-glue-api-common.md#regex_13) 匹配。

  使用 `DataFormat` 设置 `SchemaName` 的架构定义。

**响应**
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  表示此架构版本的唯一 ID。
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  此架构的版本（仅适用于同步流，以防这是第一个版本）。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`FAILURE` \$1`DELETING` ）。

  架构版本的状态。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ResourceNumberLimitExceededException`
+ `ThrottlingException`
+ `ConcurrentModificationException`
+ `InternalServiceException`

## UpdateSchema 操作（Python：update\$1schema）
<a name="aws-glue-api-schema-registry-api-UpdateSchema"></a>

更新架构集的描述、兼容性设置或版本检查点。

为了更新兼容性设置，调用不会验证具有新兼容性设置的整个架构版本集的兼容性。如果提供用于 `Compatibility` 的值，还需要 `VersionNumber`（检查点）。API 将验证检查点版本号的一致性。

如果提供 `VersionNumber`（检查点）的值，则 `Compatibility` 是可选的，这可用于设置/重置架构的检查点。

仅当架构处于 AVAILABLE (可用) 状态时，才会进行此更新。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
+ `SchemaVersionNumber` – 一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  通过检查点检验所需的版本号。必须提供 `VersionNumber` 或 `Compatibility` 中的一个。
+ `Compatibility` – UTF-8 字符串（有效值：`NONE` \$1`DISABLED` \$1`BACKWARD` \$1`BACKWARD_ALL` \$1`FORWARD` \$1`FORWARD_ALL` \$1`FULL` \$1`FULL_ALL` ）。

  架构的新兼容性设置。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  架构的新描述。

**响应**
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  包含该架构的注册表的名称。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ConcurrentModificationException`
+ `ThrottlingException`
+ `InternalServiceException`

## CheckSchemaVersionValidity 操作（Python：check\$1schema\$1version\$1validity）
<a name="aws-glue-api-schema-registry-api-CheckSchemaVersionValidity"></a>

验证提供的架构。这个调用没有副作用，它只是使用所提供的架构（使用 `DataFormat` 作为格式）进行验证。由于它不采用架构集名称，因此不会执行兼容性检查。

**请求**
+ `DataFormat` – *必填：* UTF-8 字符串（有效值：`AVRO` \$1 `JSON` \$1 `PROTOBUF`）。

  架构定义的数据格式。目前支持 `AVRO`、`JSON` 和 `PROTOBUF`。
+ `SchemaDefinition` – *必填*：UTF-8 字符串，长度不少于 1 个字节或超过 170000 个字节，与 [Custom string pattern #13](aws-glue-api-common.md#regex_13) 匹配。

  必须验证的架构的定义。

**响应**
+ `Valid` – 布尔值。

  如果模式有效，则返回“true”，否则返回“false”。
+ `Error` – UTF-8 字符串，长度不少于 1 个字节或超过 5000 个字节。

  验证失败错误消息。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `InternalServiceException`

## UpdateRegistry 操作（Python：update\$1registry）
<a name="aws-glue-api-schema-registry-api-UpdateRegistry"></a>

更新用于保存架构集的现有注册表。更新的属性与注册表相关，并且不会修改注册表中的任何架构。

**请求**
+ `RegistryId` – *必填：*一个 [RegistryId](#aws-glue-api-schema-registry-api-RegistryId) 对象。

  这是包装结构，包含注册表名称和 Amazon Resource Name（ARN）。
+ `Description` – *必填*：描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  注册表的描述。如果未提供描述，则不会更新此字段。

**响应**
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  更新的注册表的名称。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  更新的注册表的 Amazon Resource name（ARN）。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ConcurrentModificationException`
+ `ThrottlingException`
+ `InternalServiceException`

## GetSchemaByDefinition 操作（Python：get\$1schema\$1by\$1definition）
<a name="aws-glue-api-schema-registry-api-GetSchemaByDefinition"></a>

通过 `SchemaDefinition` 来检索架构。架构定义将发送到架构注册表、进行标准化和哈希处理。如果哈希在 `SchemaName` 或 ARN（或默认注册表，如果未提供）的范围内匹配，则返回该架构的元数据。否则，将返回 404 或 NotFound 错误。结果中将不会包含处于 `Deleted` 状态的架构版本。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  包含架构标识字段的包装结构。结构包含：
  + SchemaId\$1SchemaArn：架构的 Amazon Resource Name（ARN） 必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
  + SchemaId\$1SchemaName：架构的名称。必须提供 `SchemaArn` 或 `SchemaName` 中的一个。
+ `SchemaDefinition` – *必填*：UTF-8 字符串，长度不少于 1 个字节或超过 170000 个字节，与 [Custom string pattern #13](aws-glue-api-common.md#regex_13) 匹配。

  需要架构详细信息的架构的定义。

**响应**
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的架构 ID。
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `DataFormat` – UTF-8 字符串（有效值：`AVRO` \$1`JSON` \$1`PROTOBUF` ）。

  架构定义的数据格式。目前支持 `AVRO`、`JSON` 和 `PROTOBUF`。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`FAILURE` \$1`DELETING` ）。

  架构版本的状态。
+ `CreatedTime` – UTF-8 字符串。

  架构的创建日期和时间。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `InternalServiceException`

## GetRegistry 操作（Python：get\$1registry）
<a name="aws-glue-api-schema-registry-api-GetRegistry"></a>

详细描述指定的注册表。

**请求**
+ `RegistryId` – *必填：*一个 [RegistryId](#aws-glue-api-schema-registry-api-RegistryId) 对象。

  这是包装结构，包含注册表名称和 Amazon Resource Name（ARN）。

**响应**
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  注册表的名称。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  注册表的 Amazon Resource Name（ARN）。
+ `Description` – 描述字符串，长度不超过 2048 个字节，与 [URI address multi-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-uri) 匹配。

  注册表的描述。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`DELETING` ）。

  注册表的状态。
+ `CreatedTime` – UTF-8 字符串。

  注册表的创建日期和时间。
+ `UpdatedTime` – UTF-8 字符串。

  注册表的更新日期和时间。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `InternalServiceException`

## PutSchemaVersionMetadata 操作（Python：put\$1schema\$1version\$1metadata）
<a name="aws-glue-api-schema-registry-api-PutSchemaVersionMetadata"></a>

放置指定架构版本 ID 的元数据键值对。每个架构版本最多允许 10 个键值对。它们可以通过一个或多个调用添加。

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

  架构的唯一 ID。
+ `SchemaVersionNumber` – 一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  架构的版本号。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的唯一版本 ID。
+ `MetadataKeyValue` – *必填：*一个 [MetadataKeyValuePair](#aws-glue-api-schema-registry-api-MetadataKeyValuePair) 对象。

  元数据键的相应值。

**响应**
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  注册表的名称。
+ `LatestVersion` – 布尔值。

  架构的最新版本。
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的唯一版本 ID。
+ `MetadataKey` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键。
+ `MetadataValue` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键的值。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `AlreadyExistsException`
+ `EntityNotFoundException`
+ `ThrottlingException`
+ `ResourceNumberLimitExceededException`

## QuerySchemaVersionMetadata 操作（Python：query\$1schema\$1version\$1metadata）
<a name="aws-glue-api-schema-registry-api-QuerySchemaVersionMetadata"></a>

架构版本元数据信息的查询。

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

  包装结构，包含架构名称和 Amazon Resource Name（ARN）。
+ `SchemaVersionNumber` – 一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  架构的版本号。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的唯一版本 ID。
+ `MetadataList` – [MetadataKeyValuePair](#aws-glue-api-schema-registry-api-MetadataKeyValuePair) 对象的数组。

  搜索元数据的键值对，如果未提供键值对，则将获取所有元数据信息。
+ `MaxResults` – 数字（整数），不小于 1 或大于 50。

  每页所需的最大结果数量。如果未提供该值，则每页默认最大数量为 25。
+ `NextToken` – UTF-8 字符串。

  延续标记 (如果这是延续调用)。

**响应**
+ `MetadataInfoMap` – 键值对的映射数组。

  每个键是一个 UTF-8 字符串，不少于 1 个字节或超过 128 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  每个值都是一个 [MetadataInfo](#aws-glue-api-schema-registry-api-MetadataInfo) 对象。

  元数据键和关联值的映射。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的唯一版本 ID。
+ `NextToken` – UTF-8 字符串。

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

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `EntityNotFoundException`

## RemoveSchemaVersionMetadata 操作（Python：remove\$1schema\$1version\$1metadata）
<a name="aws-glue-api-schema-registry-api-RemoveSchemaVersionMetadata"></a>

从指定架构版本 ID 的架构版本元数据中删除键值对。

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

  包装结构，包含架构名称和 Amazon Resource Name（ARN）。
+ `SchemaVersionNumber` – 一个 [SchemaVersionNumber](#aws-glue-api-schema-registry-api-SchemaVersionNumber) 对象。

  架构的版本号。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的唯一版本 ID。
+ `MetadataKeyValue` – *必填：*一个 [MetadataKeyValuePair](#aws-glue-api-schema-registry-api-MetadataKeyValuePair) 对象。

  元数据键的值。

**响应**
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  架构的 Amazon Resource Name（ARN）。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  架构的名称。
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  注册表的名称。
+ `LatestVersion` – 布尔值。

  架构的最新版本。
+ `VersionNumber` – 数字（长度），不小于 1 或大于 100000。

  架构的版本号。
+ `SchemaVersionId` – UTF-8 字符串，长度不少于 36 个字节或超过 36 个字节，与 [Custom string pattern #45](aws-glue-api-common.md#regex_45) 匹配。

  架构版本的版本 ID。
+ `MetadataKey` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键。
+ `MetadataValue` – UTF-8 字符串，长度不少于 1 个字节或超过 256 个字节，与 [Custom string pattern #14](aws-glue-api-common.md#regex_14) 匹配。

  元数据键的值。

**错误**
+ `InvalidInputException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `EntityNotFoundException`

## DeleteRegistry 操作（Python：delete\$1registry）
<a name="aws-glue-api-schema-registry-api-DeleteRegistry"></a>

删除包含架构及其所有版本的整个注册表。要获取删除操作的状态，您可以在异步调用后调用 `GetRegistry` API。删除注册表将停用注册表的所有联机操作，如 `UpdateRegistry`、`CreateSchema`、`UpdateSchema` 和 `RegisterSchemaVersion` API。

**请求**
+ `RegistryId` – *必填：*一个 [RegistryId](#aws-glue-api-schema-registry-api-RegistryId) 对象。

  这是包装结构，包含注册表名称和 Amazon Resource Name（ARN）。

**响应**
+ `RegistryName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  正在删除的注册表的名称。
+ `RegistryArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  服务注册表的 Amazon Resource Name（ARN）。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`DELETING` ）。

  注册表的状态。成功的操作将返回 `Deleting` 状态。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `ConcurrentModificationException`

## DeleteSchema 操作（Python：delete\$1schema）
<a name="aws-glue-api-schema-registry-api-DeleteSchema"></a>

删除整个架构集，包括架构集及其所有版本。要获取删除操作的状态，您可以在异步调用后调用 `GetSchema` API。删除注册表将停用架构的所有联机操作，例如 `GetSchemaByDefinition` 和 `RegisterSchemaVersion` API。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  这是包装结构，包含架构名称和 Amazon Resource Name（ARN）。

**响应**
+ `SchemaArn` – UTF-8 字符串，长度不少于 1 个字节或超过 10240 个字节，与 [Custom string pattern #50](aws-glue-api-common.md#regex_50) 匹配。

  要删除的架构的 Amazon Resource Name（ARN）。
+ `SchemaName` – UTF-8 字符串，长度不少于 1 个字节或超过 255 个字节，与 [Custom string pattern #46](aws-glue-api-common.md#regex_46) 匹配。

  正在删除的架构的名称。
+ `Status` – UTF-8 字符串（有效值：`AVAILABLE` \$1`PENDING` \$1`DELETING` ）。

  架构的状态。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `ConcurrentModificationException`

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

从指定架构中删除版本。可以提供版本号或范围。如果兼容模式禁止删除必要的版本（如 BACKWARDS\$1FULL），则返回错误。此调用后调用的 `GetSchemaVersions` API 将列出已删除版本的状态。

当版本号范围包含检查指向版本时，API 将返回 409 冲突，并且不会继续删除操作。您必须首先使用 `DeleteSchemaCheckpoint` API，然后再使用此 API。

您无法使用 `DeleteSchemaVersions` API 删除架构集中的第一个架构版本。第一个架构版本只能通过 `DeleteSchema` API 删除。此操作还将删除附加在架构版本下的 `SchemaVersionMetadata`。硬性删除将在数据库上强制执行。

如果兼容模式禁止删除必要的版本（如 BACKWARDS\$1FULL），则返回错误。

**请求**
+ `SchemaId` – *必填：*一个 [SchemaId](#aws-glue-api-schema-registry-api-SchemaId) 对象。

  这是包装结构，包含架构名称和 Amazon Resource Name（ARN）。
+ `Versions` – *必填*：UTF-8 字符串，长度不少于 1 个字节或超过 100000 个字节，与 [Custom string pattern #15](aws-glue-api-common.md#regex_15) 匹配。

  可以提供一个版本范围，其格式可能为：
  + 单个版本号，5
  + 一个范围，5-8：删除版本 5、6、7、8

**响应**
+ `SchemaVersionErrors` – [SchemaVersionErrorItem](#aws-glue-api-schema-registry-api-SchemaVersionErrorItem) 对象的数组。

  `SchemaVersionErrorItem` 对象列表，每个对象都包含错误和架构版本。

**错误**
+ `InvalidInputException`
+ `EntityNotFoundException`
+ `AccessDeniedException`
+ `ThrottlingException`
+ `ConcurrentModificationException`