

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 用量描述檔
<a name="aws-glue-api-usage-profiles"></a>

用量描述檔 API 說明與在其中建立、更新或檢視用量描述檔相關的資料類型和 API AWS Glue。

## 資料類型
<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\$1profiles)](#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\$1profiles)
<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`