

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

# Connection Types API
<a name="aws-glue-api-catalog-connections-connections-type"></a>

連線類型 API 說明與描述連線類型相關的 AWS Glue APIs。

## Connection Management API
<a name="aws-glue-api-catalog-connections-connections-type-connection-management"></a>
+ [DescribeConnectionType 動作 (Python：describe\$1connection\$1type)](#aws-glue-api-catalog-connections-connections-type-DescribeConnectionType)
+ [ListConnectionTypes 動作 (Python：list\$1connection\$1types)](#aws-glue-api-catalog-connections-connections-type-ListConnectionTypes)
+ [ConnectionTypeBrief 結構](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeBrief)
+ [ConnectionTypeVariant 結構](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeVariant)

## DescribeConnectionType 動作 (Python：describe\$1connection\$1type)
<a name="aws-glue-api-catalog-connections-connections-type-DescribeConnectionType"></a>

`DescribeConnectionType` API 提供 AWS Glue中所指定連線類型的支援選項的完整詳細資訊。

**請求**
+ `ConnectionType` – *必要：*UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 255 個位元組，且需符合[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine)。

  要描述的連線類型名稱。

**回應**
+ `ConnectionType` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 255 個位元組，需符合[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine)。

  連線類型的名稱。
+ `Description` – UTF-8 字串，長度不可超過 1024 個位元組。

  連線類型的描述。
+ `Capabilities` – [功能](#aws-glue-api-catalog-connections-connections-type-Capabilities) 物件。

  連接器支援的身分驗證類型、資料介面類型 (運算環境) 和資料操作。
+ `ConnectionProperties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  運算環境中通用的連線屬性。
+ `ConnectionOptions` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  傳回在 `ConnectionInput.ConnectionProperties` 中建立連線時可設定的屬性。`ConnectionOptions` 定義可在傳遞至資料框的連線選項映射中的 Spark ETL 指令碼中設定的參數。
+ `AuthenticationConfiguration` – [AuthConfiguration](#aws-glue-api-catalog-connections-connections-type-AuthConfiguration) 物件。

  用於連線的身分驗證類型。
+ `ComputeEnvironmentConfigurations` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [ComputeEnvironmentConfiguration](#aws-glue-api-catalog-connections-connections-type-ComputeEnvironmentConfiguration) 物件。

  連線支援的運算環境。
+ `PhysicalConnectionRequirements` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  連線的實體需求，例如 VPC、子網路和安全群組規格。
+ `AthenaConnectionProperties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  Athena 運算環境特定的連線屬性。
+ `PythonConnectionProperties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  Python 運算環境特定的連線屬性。
+ `SparkConnectionProperties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  Spark 運算環境特定的連線屬性。

**錯誤**
+ `ValidationException`
+ `InvalidInputException`
+ `InternalServiceException`

## ListConnectionTypes 動作 (Python：list\$1connection\$1types)
<a name="aws-glue-api-catalog-connections-connections-type-ListConnectionTypes"></a>

`ListConnectionTypes` API 提供了一種探索機制來了解 AWS Glue中可用的連線類型。回應包含連線類型的清單，其中包含每種連線類型支援的高階詳細資訊。列出的連線類型是 `CreateConnection` API 中 `ConnectionType` 值的一組支援選項。

**請求**
+ `MaxResults` – 數字 (整數)，不可小於 1，也不可以大於 1000。

  回傳結果的數量上限。
+ `NextToken` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 2048 個位元組，需符合[Custom string pattern #11](aws-glue-api-common.md#regex_11)。

  接續符記，如果這是接續呼叫。

**回應**
+ `ConnectionTypes` – 一個 [ConnectionTypeBrief](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeBrief) 物件陣列。

  `ConnectionTypeBrief` 物件清單，其中包含所支援連線類型的簡短資訊。
+ `NextToken` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 2048 個位元組，需符合[Custom string pattern #11](aws-glue-api-common.md#regex_11)。

  接續字元 (如果目前清單區段不是最後一個)。

**錯誤**
+ `InternalServiceException`

## ConnectionTypeBrief 結構
<a name="aws-glue-api-catalog-connections-connections-type-ConnectionTypeBrief"></a>

`ListConnectionTypes` API 傳回的支援連線類型的簡短資訊。

**欄位**
+ `ConnectionType` – UTF-8 字串 （有效值： `JDBC` \$1 `SFTP` \$1 `MONGODB` \$1 `KAFKA` `NETWORK` \$1 `MARKETPLACE` `CUSTOM` \$1 `SALESFORCE` `VIEW_VALIDATION_REDSHIFT` \$1 `VIEW_VALIDATION_ATHENA` `GOOGLEADS` \$1 `GOOGLESHEETS` \$1 \$1 `GOOGLEANALYTICS4` \$1 \$1 \$1 \$1 \$1 \$1 `SERVICENOW` `MARKETO` `SAPODATA` `ZENDESK` `JIRACLOUD` `NETSUITEERP` `HUBSPOT` `FACEBOOKADS` `INSTAGRAMADS` `ZOHOCRM` \$1 \$1 `SALESFORCEPARDOT` \$1 \$1 \$1 `SALESFORCEMARKETINGCLOUD` \$1 `ADOBEANALYTICS` \$1 \$1 \$1 `SLACK` `LINKEDIN` `MIXPANEL` `ASANA` `STRIPE` `SMARTSHEET` `DATADOG` \$1 `WOOCOMMERCE` \$1 \$1 `INTERCOM` \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 `SNAPCHATADS` `PAYPAL` `QUICKBOOKS` `FACEBOOKPAGEINSIGHTS` `FRESHDESK` `TWILIO` `DOCUSIGNMONITOR` `FRESHSALES` `ZOOM` `GOOGLESEARCHCONSOLE` `SALESFORCECOMMERCECLOUD` `SAPCONCUR` \$1 `DYNATRACE` \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 `ORACLE` \$1 \$1 \$1 `MICROSOFTDYNAMIC365FINANCEANDOPS` `MICROSOFTTEAMS` `BLACKBAUDRAISEREDGENXT` `MAILCHIMP` `GITLAB` `PENDO` `PRODUCTBOARD` `CIRCLECI` `PIPEDIVE` `SENDGRID` `AZURECOSMOS` `AZURESQL` `BIGQUERY` `BLACKBAUD` `CLOUDERAHIVE` `CLOUDERAIMPALA` `CLOUDWATCH` `CLOUDWATCHMETRICS` `CMDB` `DATALAKEGEN2` `DB2` `DB2AS400` `DOCUMENTDB` `DOMO` `DYNAMODB` `GOOGLECLOUDSTORAGE` `HBASE` `KUSTOMER` `MICROSOFTDYNAMICS365CRM` `MONDAY` `MYSQL` `OKTA` `OPENSEARCH` \$1 \$1 \$1 \$1 `PIPEDRIVE` \$1 \$1 `POSTGRESQL` \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 `SAPHANA` `SQLSERVER` `SYNAPSE` `TERADATA` `TERADATANOS` `TIMESTREAM` `TPCDS` `VERTICA`

  連線類型的名稱。
+ `DisplayName` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  顯示在 AWS Glue 主控台中連線類型的可供人類讀取的名稱。
+ `Vendor` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  建立或維護此連線類型的廠商或供應商名稱。
+ `Description` – UTF-8 字串，長度不可超過 1024 個位元組。

  連線類型的描述。
+ `Categories` – .

  此連線類型所屬的類別清單。類別可協助使用者根據使用案例篩選和尋找適當的連線類型。
+ `Capabilities` – [功能](#aws-glue-api-catalog-connections-connections-type-Capabilities) 物件。

  連接器支援的身分驗證類型、資料介面類型 (運算環境) 和資料操作。
+ `LogoUrl` – UTF-8 字串。

  與連線類型關聯的標誌 URL。
+ `ConnectionTypeVariants` – 一個 [ConnectionTypeVariant](#aws-glue-api-catalog-connections-connections-type-ConnectionTypeVariant) 物件陣列。

  此連線類型可用的變體清單。不同的變體可能會針對特定使用案例或相同一般連線類型的實作，提供特殊組態。

## ConnectionTypeVariant 結構
<a name="aws-glue-api-catalog-connections-connections-type-ConnectionTypeVariant"></a>

代表 AWS Glue Data Catalog 中連線類型的變體。連線類型變體為相同一般連線類型的不同實作提供了特定的組態和行為。

**欄位**
+ `ConnectionTypeVariantName` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  連線類型變體的唯一識別碼。此名稱會在內部用於識別連線類型的特定變體。
+ `DisplayName` – UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

   AWS Glue 主控台中顯示的連線類型變體的人類可讀取名稱。
+ `Description` – UTF-8 字串，長度不可超過 1024 個位元組。

  連線類型變體的詳細描述，包括其用途、使用案例和任何特定組態需求。
+ `LogoUrl` – UTF-8 字串。

  與連線類型變體關聯的標誌 URL。

## 資料類型
<a name="aws-glue-api-catalog-connections-connections-type-connection-types"></a>
+ [驗證結構](#aws-glue-api-catalog-connections-connections-type-Validation)
+ [AuthConfiguration 結構](#aws-glue-api-catalog-connections-connections-type-AuthConfiguration)
+ [功能結構](#aws-glue-api-catalog-connections-connections-type-Capabilities)
+ [屬性結構](#aws-glue-api-catalog-connections-connections-type-Property)
+ [AllowedValue 結構](#aws-glue-api-catalog-connections-connections-type-AllowedValue)
+ [ComputeEnvironmentConfiguration 結構](#aws-glue-api-catalog-connections-connections-type-ComputeEnvironmentConfiguration)

## 驗證結構
<a name="aws-glue-api-catalog-connections-connections-type-Validation"></a>

定義如何在連線屬性上執行驗證。

**欄位**
+ `ValidationType` – *必要：*UTF-8 字串 (有效值：`REGEX` \$1 `RANGE`)。

  要執行的驗證類型，例如 `REGEX`。
+ `Patterns` – .

  套用至驗證的模式清單。
+ `Description` – *必要：*UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 1024 個位元組。

  驗證的描述。
+ `MaxLength` – 數字 (整數)。

  字串連線屬性的長度上限。
+ `Maximum` – 數字 (整數)。

  指定 `RANGE` 類型驗證時的最大值。
+ `Minimum` – 數字 (整數)。

  指定 `RANGE` 類型驗證時的最小值。

## AuthConfiguration 結構
<a name="aws-glue-api-catalog-connections-connections-type-AuthConfiguration"></a>

`DescribeConnectionType` API 傳回的連線的身分驗證組態。

**欄位**
+ `AuthenticationType` – *必要：*[屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  用於連線的身分驗證類型。
+ `SecretArn` – [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  Secrets Manager 的 Amazon Resource Name (ARN)。
+ `OAuth2Properties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  OAuth2 屬性的金鑰值對映射。每個值都是 `Property` 物件。
+ `BasicAuthenticationProperties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  OAuth2 屬性的金鑰值對映射。每個值都是 `Property` 物件。
+ `CustomAuthenticationProperties` – 金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  自訂身分驗證屬性的金鑰值對映射。每個值都是 `Property` 物件。

## 功能結構
<a name="aws-glue-api-catalog-connections-connections-type-Capabilities"></a>

指定 `DescribeConnectionType` API 傳回的支援的身分驗證類型。

**欄位**
+ `SupportedAuthenticationTypes` – *必要：*UTF-8 字串陣列。

  支援的身分驗證類型清單。
+ `SupportedDataOperations` – *必要：*UTF-8 字串陣列。

  支援的資料操作清單。
+ `SupportedComputeEnvironments` – *必要：*UTF-8 字串陣列。

  支援的運算環境清單。

## 屬性結構
<a name="aws-glue-api-catalog-connections-connections-type-Property"></a>

定義運算環境連線類型的物件。

**欄位**
+ `Name` – *必要：*UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  屬性的名稱。
+ `Description` – *必要：*UTF-8 字串，長度不可超過 1024 個位元組。

  屬性的描述。
+ `Required` – *必要：*布林值。

  指示屬性是否為必要。
+ `PropertyTypes` – *必要：*UTF-8 字串陣列。

  描述屬性的類型。
+ `AllowedValues` – 一個 [AllowedValue](#aws-glue-api-catalog-connections-connections-type-AllowedValue) 物件陣列。

  `AllowedValue` 物件清單，代表屬性允許的值。
+ `DataOperationScopes` – UTF-8 字串陣列。

  指出哪些資料操作適用於屬性。

## AllowedValue 結構
<a name="aws-glue-api-catalog-connections-connections-type-AllowedValue"></a>

代表屬性允許值的物件。

**欄位**
+ `Description` – UTF-8 字串，長度不可超過 1024 個位元組。

  允許值的描述。
+ `Value` – *必要：*UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  屬性允許的值。

## ComputeEnvironmentConfiguration 結構
<a name="aws-glue-api-catalog-connections-connections-type-ComputeEnvironmentConfiguration"></a>

包含 `DescribeConnectionType` API 傳回的運算環境 (例如 Spark、Python 或 Athena) 組態的物件。

**欄位**
+ `Name` – *必要：*UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  運算環境組態的名稱。
+ `Description` – *必要：*UTF-8 字串，長度不可超過 1024 個位元組。

  運算環境的描述。
+ `ComputeEnvironment` – *必要：*UTF-8 字串 (有效值：`SPARK` \$1 `ATHENA` \$1 `PYTHON`)。

  運算環境類型。
+ `SupportedAuthenticationTypes` – *必要：*UTF-8 字串陣列。

  運算環境的支援的身分驗證類型。
+ `ConnectionOptions` – *必要：*金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值都是 [屬性](#aws-glue-api-catalog-connections-connections-type-Property) 物件。

  用作運算環境連線選項的參數。
+ `ConnectionPropertyNameOverrides` – *必要：*金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  連線屬性名稱會覆寫運算環境。
+ `ConnectionOptionNameOverrides` – *必要：*金鑰值對的映射陣列。

  每個金鑰均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  每個值均為 UTF-8 字串，長度不可小於 1 個位元組，也不可以超過 128 個位元組。

  連線選項名稱會覆寫運算環境。
+ `ConnectionPropertiesRequiredOverrides` – *必要：*。

  運算環境的覆寫所需的連線屬性。
+ `PhysicalConnectionPropertiesRequired` – 布林值。

  指出運算環境是否需要 `PhysicalConnectionProperties`。