

# 使用情况配置文件
<a name="aws-glue-api-usage-profiles"></a>

使用情况配置文件 API 介绍与在 AWS Glue 中创建、更新或查看使用情况配置文件相关的数据类型和 API。

## 数据类型
<a name="aws-glue-api-usage-profiles-objects"></a>
+ [ProfileConfiguration 结构](#aws-glue-api-usage-profiles-ProfileConfiguration)
+ [ConfigurationObject 结构](#aws-glue-api-usage-profiles-ConfigurationObject)
+ [UsageProfileDefinition 结构](#aws-glue-api-usage-profiles-UsageProfileDefinition)

## ProfileConfiguration 结构
<a name="aws-glue-api-usage-profiles-ProfileConfiguration"></a>

指定管理员在 AWS Glue 使用情况配置文件中配置的任务和会话值。

**字段**
+ `SessionConfiguration` – 键值对的映射数组。

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

  每个值都是一个 [ConfigurationObject](#aws-glue-api-usage-profiles-ConfigurationObject) 对象。

  配置 AWS Glue 会话参数的键值映射。
+ `JobConfiguration` – 键值对的映射数组。

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

  每个值都是一个 [ConfigurationObject](#aws-glue-api-usage-profiles-ConfigurationObject) 对象。

  配置 AWS Glue 任务参数的键值映射。

## ConfigurationObject 结构
<a name="aws-glue-api-usage-profiles-ConfigurationObject"></a>

指定管理员为 AWS Glue 使用情况配置文件中配置的每个任务或会话参数设置的值。

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

  参数的默认值。
+ `AllowedValues` – UTF-8 字符串数组。

  参数允许的值的列表。
+ `MinValue` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节，与 [Custom string pattern #35](aws-glue-api-common.md#regex_35) 匹配。

  参数允许的最小值。
+ `MaxValue` – UTF-8 字符串，长度不少于 1 个字节或超过 128 个字节，与 [Custom string pattern #35](aws-glue-api-common.md#regex_35) 匹配。

  参数允许的最大值。

## UsageProfileDefinition 结构
<a name="aws-glue-api-usage-profiles-UsageProfileDefinition"></a>

描述 AWS Glue 使用情况配置文件。

**字段**
+ `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) 匹配。

  使用情况配置文件的描述。
+ `CreatedOn` – 时间戳。

  使用情况配置文件创建的日期和时间。
+ `LastModifiedOn` – 时间戳。

  使用情况配置文件上次修改的日期和时间。

## 操作
<a name="aws-glue-api-usage-profiles-actions"></a>
+ [CreateUsageProfile 操作（Python：create\$1usage\$1profile）](#aws-glue-api-usage-profiles-CreateUsageProfile)
+ [GetUsageProfile 操作（Python：get\$1usage\$1profile）](#aws-glue-api-usage-profiles-GetUsageProfile)
+ [UpdateUsageProfile 操作（Python：update\$1usage\$1profile）](#aws-glue-api-usage-profiles-UpdateUsageProfile)
+ [DeleteUsageProfile 操作（Python：delete\$1usage\$1profile）](#aws-glue-api-usage-profiles-DeleteUsageProfile)
+ [ListUsageProfiles 操作（Python：list\$1usage\$1profile）](#aws-glue-api-usage-profiles-ListUsageProfiles)

## CreateUsageProfile 操作（Python：create\$1usage\$1profile）
<a name="aws-glue-api-usage-profiles-CreateUsageProfile"></a>

创建 AWS Glue 使用情况配置文件。

**请求**
+ `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) 匹配。

  使用情况配置文件的描述。
+ `Configuration` – *必填：*一个 [ProfileConfiguration](#aws-glue-api-usage-profiles-ProfileConfiguration) 对象。

  `ProfileConfiguration` 对象，用于指定配置文件的任务和会话值。
+ `Tags` – 键值对的映射数组，不超过 50 对。

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

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

  应用于用使用情况配置文件的标签列表。

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

  创建的使用情况配置文件的名称。

**错误**
+ `InvalidInputException`
+ `InternalServiceException`
+ `AlreadyExistsException`
+ `OperationTimeoutException`
+ `ResourceNumberLimitExceededException`
+ `OperationNotSupportedException`

## GetUsageProfile 操作（Python：get\$1usage\$1profile）
<a name="aws-glue-api-usage-profiles-GetUsageProfile"></a>

检索有关指定 AWS Glue 使用情况配置文件的信息。

**请求**
+ `Name` – *必填：*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) 匹配。

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

  使用情况配置文件的描述。
+ `Configuration` – 一个 [ProfileConfiguration](#aws-glue-api-usage-profiles-ProfileConfiguration) 对象。

  `ProfileConfiguration` 对象，用于指定配置文件的任务和会话值。
+ `CreatedOn` – 时间戳。

  使用情况配置文件创建的日期和时间。
+ `LastModifiedOn` – 时间戳。

  使用情况配置文件上次修改的日期和时间。

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

## UpdateUsageProfile 操作（Python：update\$1usage\$1profile）
<a name="aws-glue-api-usage-profiles-UpdateUsageProfile"></a>

更新 AWS Glue 使用情况配置文件。

**请求**
+ `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) 匹配。

  使用情况配置文件的描述。
+ `Configuration` – *必填：*一个 [ProfileConfiguration](#aws-glue-api-usage-profiles-ProfileConfiguration) 对象。

  `ProfileConfiguration` 对象，用于指定配置文件的任务和会话值。

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

  已更新的使用情况配置文件的名称。

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

## DeleteUsageProfile 操作（Python：delete\$1usage\$1profile）
<a name="aws-glue-api-usage-profiles-DeleteUsageProfile"></a>

删除 AWS Glue 指定使用情况配置文件。

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

  要删除的使用情况配置文件的名称。

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

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

## ListUsageProfiles 操作（Python：list\$1usage\$1profile）
<a name="aws-glue-api-usage-profiles-ListUsageProfiles"></a>

列出所有 AWS Glue 使用情况配置文件。

**请求**
+ `NextToken` – UTF-8 字符串，长度不超过 400000 个字节。

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

  要在单个响应中返回的使用情况配置文件的最大数量。

**响应**
+ `Profiles` – [UsageProfileDefinition](#aws-glue-api-usage-profiles-UsageProfileDefinition) 对象的数组。

  使用情况配置文件 (`UsageProfileDefinition`) 对象的列表。
+ `NextToken` – UTF-8 字符串，长度不超过 400000 个字节。

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

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