本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
商業內容 APIs
商業內容 API 說明在 AWS Glue Data Catalog 中管理資產、資產類型、表單類型、詞彙表、詞彙表詞彙、附件和搜尋的資料類型和操作。
資料類型
AssetFormEntry 結構
資產上的表單,由表單類型識別符及其 JSON 內容組成。
欄位
-
FormTypeId– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。定義此表單結構描述之表單類型的識別符。
-
Content– UTF-8 字串。表單的 JSON 內容,符合指定表單類型的結構描述。
AssetTypeFormReference 結構
資產類型中包含的表單類型的參考。
欄位
-
FormTypeIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。參考表單類型的識別符。
IterableFormEntry 結構
資產上可用的可疊代表單,由其表單類型識別。
欄位
-
FormTypeId– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。可重複格式的表單類型識別符 (例如
columns),用於透過ListIterableForms或 擷取其項目BatchGetIterableForms。
IterableFormItem 結構
具有其表單的完整可疊代表單項目。
欄位
-
ItemId– UTF-8 字串。項目的唯一識別符。
-
ItemName– UTF-8 字串。項目的名稱。
-
GlossaryTerms– UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。與該項目相關聯的詞彙表詞彙識別符。
-
Forms– 金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 AssetFormEntry 物件。
項目上的表單,依表單名稱輸入。
-
Attachments– 金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 AssetFormEntry 物件。
項目上的其他附件可提供更多內容,以附件名稱輸入。
IterableFormListItem 結構
可重複格式的項目摘要。
欄位
-
ItemId– UTF-8 字串。項目的唯一識別符。
-
ItemName– UTF-8 字串。項目的名稱。
-
Description– UTF-8 字串。項目的描述。
-
GlossaryTerms– UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。與該項目相關聯的詞彙表詞彙識別符。
SearchResultItem 結構
代表相符資產的單一搜尋結果項目。
欄位
-
Id– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。相符資產的唯一識別符。
-
AssetName– UTF-8 字串。相符資產的名稱。
-
AssetDescription– UTF-8 字串。相符資產的描述。
-
UpdatedAt– 時間戳記。上次更新相符資產的時間戳記。
-
AssetTypeId– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。相符資產的資產類型識別符。
SearchSort 結構
搜尋結果的排序條件。
欄位
-
Attribute– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組。要排序的屬性。
-
Order– UTF-8 字串 (有效值:ASCENDING|DESCENDING)。排序順序。有效值為
ASCENDING和DESCENDING。
SearchFilterClause 結構
支援巢狀布林邏輯的篩選條件子句。必須mapFilter指定 andAllFilters、attributeFilter、 或 orAnyFilters中的一個。
欄位
-
AndAllFilters– SearchFilterClause 物件陣列,不可小於 1 個或超過 10 個結構。必須全部相符的篩選條件子句清單 (邏輯 AND)。
-
OrAnyFilters– SearchFilterClause 物件陣列,不可小於 1 個或超過 10 個結構。篩選條件子句清單,其中至少一個必須相符 (邏輯 OR)。
-
AttributeFilter– SearchAttributeFilter 物件。單一屬性值的篩選條件。
-
MapFilter– .映射屬性鍵/值對上的篩選條件。
SearchAttributeFilter 結構
使用 運算子比較屬性值的篩選條件。
欄位
-
Attribute– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組。要篩選的屬性名稱。
-
Operator– 必要:UTF-8 字串 (有效值:equals|greaterThan|greaterThanOrEquals|lessThan|lessThanOrEquals|notExists)。比較運算子。有效值為
equals、greaterThan、greaterThanOrEquals、lessThanOrEquals、lessThan和notExists。 -
Value– SearchFilterValue 物件。要比較的值。
SearchFilterValue 結構
篩選條件值。必須longValue指定 stringValue或 的其中之一。
欄位
-
StringValue– UTF-8 字串,長度不可超過 256 個位元組。字串篩選條件值。
-
LongValue– 數字 (long)。長整數篩選條件值。
ItemError 結構
擷取可重複的表單項目時發生錯誤。
欄位
-
ItemIdentifier– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組。造成錯誤的項目識別符。
-
Code– UTF-8 字串。錯誤代碼。
-
Message– UTF-8 字串。錯誤訊息。
GetAssetOutput 結構
GetAsset 操作的回應結構。
欄位
-
Id– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
Name– UTF-8 字串。資產的名稱。
-
Description– UTF-8 字串。資產的描述。
-
CreatedAt– 時間戳記。建立資產的時間戳記。
-
UpdatedAt– 時間戳記。上次更新資產的時間戳記。
-
CreatedBy– .建立資產的委託人身分。
-
UpdatedBy– .上次更新資產的主體身分。
-
AssetTypeId– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。此資產的資產類型識別符。
-
GlossaryTerms– UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。與資產相關聯的詞彙表詞彙識別符。
-
Forms– 金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 AssetFormEntry 物件。
資產上的表單,依表單名稱輸入。
-
Attachments– 金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 AssetFormEntry 物件。
資產上的其他附件可提供更多內容,以附件名稱為索引鍵。
-
IterableForms– 金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 IterableFormEntry 物件。
資產上可用的可迭代表單,以表單名稱 (例如
columns) 為索引鍵。使用表單名稱搭配ListIterableForms或BatchGetIterableForms來擷取表單的項目。
SearchOutput 結構
Search 操作的回應結構。
欄位
-
Items– 一個 SearchResultItem 物件陣列。符合搜尋條件的資產清單。
-
TotalCount– 數字 (整數)。符合搜尋條件的資產總數。
-
NextToken– UTF-8 字串。接續字符,如果目前區段不是最後一個,將會出現此接續字符。
-
Aggregations– 物件陣列。所請求屬性的彙總結果。
作業
GetAsset 動作 (Python:get_asset)
擷取 AWS Glue Data Catalog 中資產的中繼資料,包括其表單、其他附件和相關聯的詞彙表術語。
範例
下列範例會依其識別符擷取資產。
aws glue get-asset --identifier quarterly-sales-2026q1 { "Id": "quarterly-sales-2026q1", "Name": "Quarterly Sales 2026 Q1", "Description": "Aggregated quarterly sales metrics", "CreatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "DataSet", "GlossaryTerms": [], "Forms": { "DataClassification": { "FormTypeId": "DataClassification", "Content": "{\"classification\":\"internal\",\"owner\":\"data-platform-team\"}" } }, "Attachments": {}, "IterableForms": {} }
請求
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。要擷取之資產的唯一識別符。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionThrottlingExceptionInvalidInputException
PutAsset 動作 (Python: put_asset)
在 AWS Glue Data Catalog 中建立或更新資產。如果資產已存在,此操作會更新它,否則會建立新的資產。
範例
下列範例會使用 表單建立資產。
aws glue put-asset \ --asset-type-id DataSet \ --identifier quarterly-sales-2026q1 \ --name "Quarterly Sales 2026 Q1" \ --description "Aggregated quarterly sales metrics" \ --forms '{"DataClassification":{"FormTypeId":"DataClassification","Content":"{\"classification\":\"internal\",\"owner\":\"data-platform-team\"}"}}' { "Id": "quarterly-sales-2026q1", "Name": "Quarterly Sales 2026 Q1", "Description": "Aggregated quarterly sales metrics", "CreatedAt": "2026-06-16T06:42:00.442Z", "Forms": { "DataClassification": { "FormTypeId": "DataClassification", "Content": "{\"classification\":\"internal\",\"owner\":\"data-platform-team\"}" } } }
請求
-
AssetTypeId– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。資產的資產類型識別符。
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。如果具有此識別符的資產已存在,則會進行更新。
-
Name– 必要:UTF-8 字串。資產的名稱。
-
Description– UTF-8 字串。資產的描述。
-
Forms– 必要:金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 AssetFormEntry 物件。
要在資產上設定的表單,依表單名稱輸入。每個項目指定表單類型及其 JSON 內容。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
Name– 必要:UTF-8 字串。資產的名稱。
-
Description– UTF-8 字串。資產的描述。
-
CreatedAt– 時間戳記。建立資產的時間戳記。
-
Forms– 金鑰值對的映射陣列。每個金鑰都是 UTF-8 字串。
每個值都是 AssetFormEntry 物件。
附加至資產的表單,依表單名稱輸入。
錯誤
AccessDeniedExceptionConcurrentModificationExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
DeleteAsset 動作 (Python:Delete_asset)
從 AWS Glue Data Catalog 刪除資產。
範例
下列範例會依其識別符刪除資產。
aws glue delete-asset --identifier quarterly-sales-2026q1
請求
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。要刪除之資產的唯一識別符。
回應
無回應參數。
錯誤
AccessDeniedExceptionConcurrentModificationExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
PutAssetType 動作 (Python: put_asset_type)
在 AWS Glue Data Catalog 中建立或更新資產類型。資產類型透過指定資產包含的形式來定義資產的結構。如果具有指定名稱的資產類型已存在,則會進行更新。
範例
下列範例會建立參考表單類型的資產類型。
aws glue put-asset-type \ --name DataSet \ --forms '{"DataClassification":{"FormTypeIdentifier":"DataClassification"}}' { "Id": "DataSet", "Name": "DataSet", "Forms": { "DataClassification": { "FormTypeIdentifier": "DataClassification" } } }
請求
-
Name– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,且需符合String。資產類型的名稱。
-
Forms– 必要:索引鍵/值對的映射陣列,不可小於 1 個或超過 100 個。每個金鑰都是 UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,需符合
String。每個值都是 AssetTypeFormReference 物件。
組成資產類型的表單,依表單名稱輸入。每個項目都會參考定義表單結構描述的表單類型。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。資產類型的識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,且需符合String。資產類型的名稱。
-
Forms– 索引鍵/值對的映射陣列,不可小於 1 個或超過 100 個。每個金鑰都是 UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,需符合
String。每個值都是 AssetTypeFormReference 物件。
組成資產類型的表單,依表單名稱輸入。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
GetAssetType 動作 (Python:get_asset_type)
依其識別符擷取 AWS Glue Data Catalog 中的資產類型。
範例
下列範例會依其識別符擷取資產類型。
aws glue get-asset-type --identifier DataSet { "Id": "DataSet", "Name": "DataSet", "Forms": { "DataClassification": { "FormTypeIdentifier": "DataClassification" } } }
請求
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。要擷取之資產類型的識別符。
回應
-
Id– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。資產類型的識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,且需符合String。資產類型的名稱。
-
Forms– 索引鍵/值對的映射陣列,不可小於 1 個或超過 100 個。每個金鑰都是 UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,需符合
String。每個值都是 AssetTypeFormReference 物件。
組成資產類型的表單,依表單名稱輸入。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
DeleteAssetType 動作 (Python:Delete_asset_type)
從 AWS Glue Data Catalog 刪除資產類型。
範例
下列範例會依其識別符刪除資產類型。
aws glue delete-asset-type --identifier DataSet
請求
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。要刪除之資產類型的識別符。
回應
無回應參數。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
ListAssetTypes 動作 (Python:list_asset_types)
列出 AWS Glue Data Catalog 中定義的資產類型。
範例
下列範例列出帳戶中的資產類型。
aws glue list-asset-types --max-results 20 { "Items": [ { "Id": "DataSet", "Name": "DataSet" } ] }
請求
-
MaxResults– 數字 (整數),不可小於 1,也不可以大於 1000。回應中傳回的結果數目上限。
-
NextToken– UTF-8 字串。接續符記,如果這是接續呼叫。
回應
-
Items– 物件陣列。資產類型項目的清單。
-
NextToken– UTF-8 字串。接續字符,如果目前區段不是最後一個,將會出現此接續字符。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
PutFormType 動作 (Python: put_form_type)
在 AWS Glue Data Catalog 中建立或更新表單類型。表單類型定義可連接到資產的結構化中繼資料結構描述。
範例
下列範例會使用 Smithy 結構描述建立表單類型。
aws glue put-form-type \ --name DataClassification \ --schema 'structure DataClassification { classification: String owner: String }' { "Id": "DataClassification", "Name": "DataClassification", "Schema": "structure DataClassification {\n classification: String\n owner: String\n}" }
請求
-
Name– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,且需符合String。表單類型的名稱。必須以大寫字母開頭。
-
Schema– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 100000 個位元組。表單類型的 Smithy IDL 結構描述定義。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。表單類型的識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,且需符合String。表單類型的名稱。
-
Schema– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 100000 個位元組。表單類型的 Smithy IDL 結構描述。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
GetFormType 動作 (Python:get_form_type)
依 AWS Glue Data Catalog 的識別符擷取表單類型。
範例
下列範例會依表單的識別符擷取表單類型。
aws glue get-form-type --identifier DataClassification { "Id": "DataClassification", "Name": "DataClassification", "Schema": "structure DataClassification {\n classification: String\n owner: String\n}" }
請求
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。要擷取之表單類型的識別符。
回應
-
Id– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。表單類型的識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 128 個位元組,且需符合String。表單類型的名稱。
-
Schema– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 100000 個位元組。表單類型的 Smithy IDL 結構描述。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
DeleteFormType 動作 (Python:Delete_form_type)
從 AWS Glue Data Catalog 刪除表單類型。如果仍由資產類型參考,則無法刪除表單類型。
範例
下列範例會依表單的識別符刪除表單類型。
aws glue delete-form-type --identifier DataClassification
請求
-
Identifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。要刪除之表單類型的識別符。
回應
無回應參數。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionConflictExceptionThrottlingException
ListFormTypes 動作 (Python:list_form_types)
列出 AWS Glue Data Catalog 中定義的表單類型。
範例
下列範例列出帳戶中的表單類型。
aws glue list-form-types --max-results 20 { "Items": [ { "Id": "DataClassification", "Name": "DataClassification" } ] }
請求
-
MaxResults– 數字 (整數),不可小於 1,也不可以大於 1000。在回應中傳回的結果數目上限。
-
NextToken– UTF-8 字串。接續符記,如果這是接續呼叫。
回應
-
Items– 必要:物件陣列。表單類型項目的清單。
-
NextToken– UTF-8 字串。接續字符,如果目前區段不是最後一個,將會出現此接續字符。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
PutAttachment 動作 (Python: put_attachment)
將表單連接至 AWS Glue Data Catalog 中的資產或可重複的表單項目。如果具有相同名稱的附件已存在,則會予以覆寫。
範例
下列範例會將表單連接至資產。
aws glue put-attachment \ --asset-identifier quarterly-sales-2026q1 \ --attachment-name reviewNote \ --form-type-id DataClassification \ --content '{"classification":"internal","owner":"analytics-team"}' { "AssetId": "quarterly-sales-2026q1", "AttachmentName": "reviewNote", "FormTypeId": "DataClassification" }
請求
-
AssetIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。要連接表單之資產的唯一識別符。
-
IterableFormName– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,且需符合String。可疊代表單的名稱。與 一起指定時
itemIdentifier,附件會以可重複的形式而非資產本身為目標。 -
ItemIdentifier– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組。可重複形式內項目的識別符。指定
iterableFormName時為必要。 -
AttachmentName– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,需符合String。附件的名稱。
-
Content– 必要:UTF-8 字串。表單的 JSON 內容,符合指定表單類型的結構描述。
-
FormTypeId– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。此附件之表單類型的識別符。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
AssetId– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
IterableFormName– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,且需符合String。如果附件以項目為目標,則可疊代表單的名稱。
-
ItemIdentifier– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組。項目的識別符,如適用,以可重複的形式顯示。
-
AttachmentName– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,且需符合String。附件的名稱。
-
FormTypeId– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。此附件之表單類型的識別符。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
DeleteAttachment 動作 (Python:Delete_attachment)
從 AWS Glue Data Catalog 中的資產刪除表單附件。
範例
下列範例會從資產刪除附件。
aws glue delete-attachment \ --identifier quarterly-sales-2026q1 \ --attachment-name reviewNote { "Identifier": "quarterly-sales-2026q1" }
請求
-
AssetIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。要從中刪除附件之資產的唯一識別符。
-
AttachmentName– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,需符合String。要刪除的附件名稱。
回應
-
Identifier– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
ListIterableForms 動作 (Python:list_iterable_forms)
在 AWS Glue Data Catalog 的資產上,以可重複的形式列出項目。例如, 會列出資料表資產的資料欄。
範例
下列範例列出資產的資料欄。
aws glue list-iterable-forms \ --asset-identifier quarterly-sales-2026q1 \ --iterable-form-name columns \ --max-results 20 { "AssetId": "quarterly-sales-2026q1", "IterableFormName": "columns", "Items": [ { "ItemId": "quarterly-sales-2026q1#region", "ItemName": "region", "Description": "AWS region of the sales record", "GlossaryTerms": [] }, { "ItemId": "quarterly-sales-2026q1#amount", "ItemName": "amount", "Description": "Sales amount in USD", "GlossaryTerms": [] } ] }
請求
-
AssetIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
IterableFormName– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,需符合String。要從中列出項目的可疊代表單名稱。
-
MaxResults– 數字 (整數),不可小於 1,也不可以大於 1000。在回應中傳回的結果數目上限。
-
NextToken– UTF-8 字串。接續符記,如果這是接續呼叫。
回應
-
AssetId– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
IterableFormName– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,且需符合String。可疊代表單的名稱。
-
Items– 一個 IterableFormListItem 物件陣列。可重複的表單項目清單。
-
NextToken– UTF-8 字串。接續字符,如果目前區段不是最後一個,將會出現此接續字符。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionThrottlingExceptionInvalidInputException
BatchGetIterableForms 動作 (Python: batch_get_iterable_forms)
在單一請求中,從 AWS Glue Data Catalog 中資產上的可重複形式擷取多個項目。
範例
下列範例會依識別符擷取特定資料欄。
aws glue batch-get-iterable-forms \ --asset-identifier quarterly-sales-2026q1 \ --iterable-form-name columns \ --item-identifiers region amount { "Items": [ { "ItemId": "quarterly-sales-2026q1#region", "ItemName": "region", "GlossaryTerms": [], "Forms": { "columns": { "FormTypeId": "amazon.glue::Column", "Content": "{\"type\":\"string\"}" } }, "Attachments": {} }, { "ItemId": "quarterly-sales-2026q1#amount", "ItemName": "amount", "GlossaryTerms": [], "Forms": { "columns": { "FormTypeId": "amazon.glue::Column", "Content": "{\"type\":\"double\"}" } }, "Attachments": {} } ], "Errors": [] }
請求
-
AssetIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
IterableFormName– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組,需符合String。要從中擷取項目的可疊代表單名稱。
-
ItemIdentifiers– 必要:UTF-8 字串的陣列,不可小於 1,也不可超過 100 個字串。要擷取的項目識別符清單。每個識別符可以是項目 ID 或項目名稱。
回應
-
Items– 一個 IterableFormItem 物件陣列。擷取的可疊代表單項目清單。
-
Errors– 一個 ItemError 物件陣列。無法擷取之項目的錯誤清單。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
CreateGlossary 動作 (Python:create_glossary)
在 AWS Glue Data Catalog 中建立業務詞彙表。詞彙表是定義商業概念之詞彙表詞彙的容器。
範例
下列範例會建立商業詞彙表。
aws glue create-glossary \ --name "Sales Terms" \ --description "Glossary of sales-domain business terms" { "Id": "6n5f21s641nbjb", "Name": "Sales Terms", "Description": "Glossary of sales-domain business terms" }
請求
-
Name– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表的名稱。
-
Description– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 2,048 個位元組。詞彙表的說明。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– UTF-8 字串。詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表的名稱。
-
Description– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 2,048 個位元組。詞彙表的說明。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingExceptionAlreadyExistsException
GetGlossary 動作 (Python:get_glossary)
依其識別符擷取 AWS Glue Data Catalog 中的商業詞彙表。
範例
下列範例會依其識別符擷取詞彙表。
aws glue get-glossary --identifier 6n5f21s641nbjb { "Id": "6n5f21s641nbjb", "Name": "Sales Terms", "Description": "Glossary of sales-domain business terms" }
請求
-
Identifier– 必要:UTF-8 字串。要擷取之詞彙表的唯一識別符。
回應
-
Id– UTF-8 字串。詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表的名稱。
-
Description– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 2,048 個位元組。詞彙表的說明。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionThrottlingException
UpdateGlossary 動作 (Python:update_glossary)
更新 AWS Glue Data Catalog 中的商業詞彙表。
範例
下列範例會更新詞彙表的描述。
aws glue update-glossary \ --identifier 6n5f21s641nbjb \ --name "Sales Terms" \ --description "Glossary of sales and revenue business terms" { "Id": "6n5f21s641nbjb", "Name": "Sales Terms", "Description": "Glossary of sales and revenue business terms" }
請求
-
Identifier– 必要:UTF-8 字串。要更新之詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表的更新名稱。
-
Description– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 2,048 個位元組。詞彙表的更新描述。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– UTF-8 字串。詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表的名稱。
-
Description– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 2,048 個位元組。詞彙表的說明。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingExceptionAlreadyExistsException
DeleteGlossary 動作 (Python:Delete_glossary)
從 AWS Glue Data Catalog 刪除業務詞彙表。如果詞彙表仍包含詞彙表詞彙,則無法刪除。
範例
下列範例會依其識別符刪除詞彙表。
aws glue delete-glossary --identifier 6n5f21s641nbjb
請求
-
Identifier– 必要:UTF-8 字串。要刪除之詞彙表的唯一識別符。
回應
無回應參數。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConflictExceptionConcurrentModificationExceptionThrottlingException
ListGlossaries 動作 (Python:list_glossaries)
列出 AWS Glue Data Catalog 中的商業詞彙表。
範例
下列範例列出帳戶中的詞彙表。
aws glue list-glossaries --max-results 20 { "Items": [ { "Id": "6n5f21s641nbjb", "Name": "Sales Terms", "Description": "Glossary of sales and revenue business terms" } ] }
請求
-
MaxResults– 數字 (整數),不可小於 1,也不可以大於 1000。在回應中傳回的結果數目上限。
-
NextToken– UTF-8 字串。接續符記,如果這是接續呼叫。
回應
-
Items– 物件陣列。詞彙表項目清單。
-
NextToken– UTF-8 字串。接續字符,如果目前區段不是最後一個,將會出現此接續字符。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
CreateGlossaryTerm 動作 (Python:create_glossary_term)
在 AWS Glue Data Catalog 中的業務詞彙表內建立詞彙表字詞。
範例
下列範例會建立詞彙表詞彙。
aws glue create-glossary-term \ --glossary-identifier 6n5f21s641nbjb \ --name "Net Revenue" \ --short-description "Revenue after returns, allowances, and discounts." \ --long-description "Net revenue is gross revenue minus returns, allowances, and discounts over a reporting period." { "Id": "avugvxvsul6izr", "GlossaryId": "6n5f21s641nbjb", "Name": "Net Revenue", "ShortDescription": "Revenue after returns, allowances, and discounts.", "LongDescription": "Net revenue is gross revenue minus returns, allowances, and discounts over a reporting period." }
請求
-
GlossaryIdentifier– 必要:UTF-8 字串。要在其中建立詞彙的詞彙表唯一識別符。
-
Name– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表字詞的名稱。
-
ShortDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1024 個位元組。詞彙表術語的簡短描述。
-
LongDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 4096 個位元組。詞彙表詞彙的詳細說明。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– UTF-8 字串。詞彙表詞彙的唯一識別符。
-
GlossaryId– UTF-8 字串。包含此術語之詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表字詞的名稱。
-
ShortDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1024 個位元組。詞彙表詞彙的簡短描述。
-
LongDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 4096 個位元組。詞彙表詞彙的長描述。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingExceptionAlreadyExistsException
GetGlossaryTerm 動作 (Python:get_glossary_term)
依其識別符擷取 AWS Glue Data Catalog 中的詞彙表字詞。
範例
下列範例會依其識別符擷取詞彙表詞彙。
aws glue get-glossary-term --identifier avugvxvsul6izr { "Id": "avugvxvsul6izr", "GlossaryId": "6n5f21s641nbjb", "Name": "Net Revenue", "ShortDescription": "Revenue after returns, allowances, and discounts.", "LongDescription": "Net revenue is gross revenue minus returns, allowances, and discounts over a reporting period." }
請求
-
Identifier– 必要:UTF-8 字串。要擷取之詞彙表詞彙的唯一識別符。
回應
-
Id– UTF-8 字串。詞彙表詞彙的唯一識別符。
-
GlossaryId– UTF-8 字串。包含此術語之詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表字詞的名稱。
-
ShortDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1024 個位元組。詞彙表詞彙的簡短描述。
-
LongDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 4096 個位元組。詞彙表詞彙的長描述。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionThrottlingException
UpdateGlossaryTerm 動作 (Python:update_glossary_term)
更新 AWS Glue Data Catalog 中的詞彙表字詞。
範例
下列範例會更新詞彙表詞彙的簡短描述。
aws glue update-glossary-term \ --identifier avugvxvsul6izr \ --name "Net Revenue" \ --short-description "Gross revenue minus returns, allowances, and discounts." \ --long-description "Net revenue is gross revenue minus returns, allowances, and discounts over a reporting period." { "Id": "avugvxvsul6izr", "GlossaryId": "6n5f21s641nbjb", "Name": "Net Revenue", "ShortDescription": "Gross revenue minus returns, allowances, and discounts.", "LongDescription": "Net revenue is gross revenue minus returns, allowances, and discounts over a reporting period." }
請求
-
Identifier– 必要:UTF-8 字串。要更新的詞彙表詞彙的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表字詞的更新名稱。
-
ShortDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1024 個位元組。詞彙表術語的更新簡短描述。
-
LongDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 4096 個位元組。詞彙表術語的更新詳細描述。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Id– UTF-8 字串。詞彙表詞彙的唯一識別符。
-
GlossaryId– UTF-8 字串。包含此術語之詞彙表的唯一識別符。
-
Name– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 256 個位元組。詞彙表字詞的名稱。
-
ShortDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1024 個位元組。詞彙表詞彙的簡短描述。
-
LongDescription– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 4096 個位元組。詞彙表詞彙的長描述。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingExceptionAlreadyExistsException
DeleteGlossaryTerm 動作 (Python:Delete_glossary_term)
從 AWS Glue Data Catalog 刪除詞彙表字詞。
範例
下列範例會依其識別符刪除詞彙表字詞。
aws glue delete-glossary-term --identifier avugvxvsul6izr
請求
-
Identifier– 必要:UTF-8 字串。要刪除之詞彙表詞彙的唯一識別符。
回應
無回應參數。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
ListGlossaryTerms 動作 (Python:list_glossary_terms)
列出 Data Catalog 中商業詞彙表內的 AWS Glue 詞彙表詞彙。
範例
下列範例列出詞彙表中的詞彙。
aws glue list-glossary-terms \ --glossary-identifier 6n5f21s641nbjb \ --max-results 20 { "Items": [ { "Id": "avugvxvsul6izr", "Name": "Net Revenue", "ShortDescription": "Gross revenue minus returns, allowances, and discounts." } ] }
請求
-
GlossaryIdentifier– 必要:UTF-8 字串。要列出詞彙的詞彙表唯一識別符。
-
MaxResults– 數字 (整數),不可小於 1,也不可以大於 1000。在回應中傳回的結果數目上限。
-
NextToken– UTF-8 字串。接續符記,如果這是接續呼叫。
回應
-
GlossaryId– UTF-8 字串。詞彙表的唯一識別符。
-
Items– 物件陣列。詞彙表詞彙項目的清單。
-
NextToken– UTF-8 字串。接續字符,如果目前區段不是最後一個,將會出現此接續字符。
錯誤
AccessDeniedExceptionInternalServiceExceptionInvalidInputExceptionThrottlingException
AssociateGlossaryTerms 動作 (Python:associate_glossary_terms)
將一或多個詞彙表詞彙與 AWS Glue Data Catalog 中的資產建立關聯。
範例
下列範例會將詞彙表詞彙與資產建立關聯。
aws glue associate-glossary-terms \ --identifier quarterly-sales-2026q1 \ --glossary-term-identifiers avugvxvsul6izr { "Identifier": "quarterly-sales-2026q1", "GlossaryTerms": [ "avugvxvsul6izr" ] }
請求
-
AssetIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。要與詞彙表詞彙建立關聯之資產的唯一識別符。
-
GlossaryTermIdentifiers– 必要:UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。要與資產建立關聯的詞彙識別符清單。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Identifier– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
GlossaryTerms– UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。詞彙表術語現在已與資產建立關聯。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
DisassociateGlossaryTerms 動作 (Python:disassociate_glossary_terms)
從 AWS Glue Data Catalog 中的資產移除一或多個詞彙表詞彙的關聯。
範例
下列範例會從資產移除詞彙表字詞。
aws glue disassociate-glossary-terms \ --identifier quarterly-sales-2026q1 \ --glossary-term-identifiers avugvxvsul6izr { "Identifier": "quarterly-sales-2026q1", "GlossaryTerms": [] }
請求
-
AssetIdentifier– 必要:UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。要與詞彙表詞彙取消關聯的資產唯一識別符。
-
GlossaryTermIdentifiers– 必要:UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。要與資產取消關聯的詞彙識別符清單。
-
ClientToken– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 255 個位元組,需符合Single-line string pattern。由您提供的區分大小寫的唯一識別碼,用以確保請求的等冪性。
回應
-
Identifier– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1087 個位元組,需符合String。資產的唯一識別符。
-
GlossaryTerms– UTF-8 字串的陣列,不可小於 1,也不可超過 10 個字串。與資產相關聯的剩餘詞彙表詞彙。
錯誤
AccessDeniedExceptionEntityNotFoundExceptionInternalServiceExceptionInvalidInputExceptionConcurrentModificationExceptionThrottlingException
搜尋動作 (Python:搜尋)
使用全文搜尋、篩選條件、排序和彙總,在 AWS Glue Data Catalog 中搜尋資產。傳回具有相關性排名結果的相符資產。
範例
下列範例會執行資產的全文搜尋。
aws glue search --search-text "sales" --max-results 10 { "Items": [ { "Id": "quarterly-sales-2026q1", "AssetName": "Quarterly Sales 2026 Q1", "AssetDescription": "Aggregated quarterly sales metrics", "UpdatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "DataSet" } ] }
範例
下列範例會搜尋篩選條件子句和排序順序。
aws glue search \ --search-text "sales" \ --max-results 10 \ --filter-clause '{"AttributeFilter":{"Attribute":"AssetTypeId","Operator":"equals","Value":{"StringValue":"DataSet"}}}' \ --sort '{"Attribute":"name","Order":"ASCENDING"}' { "Items": [ { "Id": "quarterly-sales-2026q1", "AssetName": "Quarterly Sales 2026 Q1", "AssetDescription": "Aggregated quarterly sales metrics", "UpdatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "DataSet" } ] }
範例
下列範例會篩選表單定義的欄位。表單欄位由表單的資產類型識別符和欄位名稱參考,並加入點 — 此處是amazon.glue::GlueTable表單databaseName的欄位。內建類型的資產類型識別符具有每個結果的 中顯示的::字首AssetTypeId。
aws glue search \ --filter-clause '{"AttributeFilter":{"Attribute":"amazon.glue::GlueTable.databaseName","Operator":"equals","Value":{"StringValue":"sales"}}}' \ --max-results 10 { "Items": [ { "Id": "arn:aws:glue:us-east-1:123456789012:table/sales/transactions", "AssetName": "transactions", "AssetDescription": "Raw sales transactions", "UpdatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "amazon.glue::GlueTable" } ] }
範例
下列範例將常見資產欄位和表單欄位與邏輯 AND 結合在一起。常見的資產欄位,例如 name、region、 type和 catalogId會直接參考;由表單定義的欄位使用 assetTypeId.fieldName 表示法。
aws glue search \ --filter-clause '{"AndAllFilters":[{"AttributeFilter":{"Attribute":"type","Operator":"equals","Value":{"StringValue":"Table"}}},{"AttributeFilter":{"Attribute":"amazon.glue::GlueTable.databaseName","Operator":"equals","Value":{"StringValue":"sales"}}}]}' \ --max-results 10 { "Items": [ { "Id": "arn:aws:glue:us-east-1:123456789012:table/sales/transactions", "AssetName": "transactions", "AssetDescription": "Raw sales transactions", "UpdatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "amazon.glue::GlueTable" } ] }
請求
-
SearchText– UTF-8 字串,長度不可小於 1 個位元組,也不可以超過 1000 個位元組。要搜尋的文字。至少
filterClause必須提供其中一個searchText或 。 -
MaxResults– 數字 (整數),不可小於 1,也不可以大於 100。在回應中傳回的結果數目上限。
-
NextToken– UTF-8 字串。接續符記,如果這是接續呼叫。
-
Sort– SearchSort 物件。搜尋結果的排序條件。
-
FilterClause– SearchFilterClause 物件。要套用至搜尋的篩選條件子句。支援具有屬性層級和映射層級篩選條件的巢狀 AND/OR 邏輯。
錯誤
AccessDeniedExceptionInvalidInputExceptionInternalServiceExceptionThrottlingException