使用API連線Azure Blob Storage至Experience Platform
閱讀本指南,瞭解如何使用Azure Blobg StorageAPIFlow Service 將您的帳戶連結至Adobe Experience Platform。
快速入門
本指南需要您深入了解下列 Adobe Experience Platform 元件:
使用Experience Platform API
如需如何成功呼叫Experience Platform API的詳細資訊,請參閱Experience Platform API快速入門指南。
收集必要的認證
閱讀Azure Blob Storage 總覽以取得驗證的相關資訊。
將您的Azure Blob Storage帳戶連線至Experience Platform connect
請閱讀下列步驟,以瞭解如何將Azure Blob Storage帳戶連線至Experience Platform。
建立基礎連線
基礎連線會將您的來源連結至Experience Platform,以儲存驗證詳細資料、連線狀態和唯一ID。 使用此ID來瀏覽來源檔案並識別要擷取的特定專案,包括其資料型別和格式。
您可以使用下列驗證型別,將您的Azure Blob Storage帳戶連線至Experience Platform:
- 帳戶金鑰驗證:使用儲存體帳戶的存取金鑰來驗證並連線至您的Azure Blob Storage帳戶。
- 共用存取簽章(SAS):使用SAS URI提供您Azure Blob Storage帳戶中資源的委派、有限時間存取權。
- 以服務主體為基礎的驗證:使用Azure Active Directory (AAD)服務主體(使用者端ID和密碼)來安全地驗證您的Azure Blob儲存帳戶。
API格式
POST /connections
若要建立基礎連線ID,請對/connections
端點提出POST要求,並提供您的驗證認證作為要求引數的一部分。
若要使用帳戶金鑰驗證,請提供您connectionString
、container
和folderPath
的值。
code language-shell |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 | |
---|---|
參數 | 說明 |
connectionString |
您的Azure Blob Storage帳戶的連線字串。 連線字串模式為: DefaultEndpointsProtocol=https;AccountName={ACCOUNT_NAME};AccountKey={ACCOUNT_KEY};EndpointSuffix=core.windows.net 。 |
container |
儲存資料檔的Azure Blob Storage容器名稱。 |
folderPath |
指定容器內檔案所在的路徑。 |
connectionSpec.id |
Azure Blob Storage來源的連線規格ID。 此ID已固定為: 4c10e202-c428-4796-9208-5f1f5732b1cf 。 |
若要使用共用存取權簽章,請提供您sasUri
、container
和folderPath
的值。
code language-shell |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 | |
---|---|
參數 | 說明 |
sasUri |
共用存取簽章URI,您可將其用作連線帳戶的替代驗證型別。 SAS URI模式為: https://{ACCOUNT_NAME}.blob.core.windows.net/?sv={STORAGE_VERSION}&st={START_TIME}&se={EXPIRE_TIME}&sr={RESOURCE}&sp={PERMISSIONS}>&sip=<{IP_RANGE}>&spr={PROTOCOL}&sig={SIGNATURE} 。 |
container |
儲存資料檔的Azure Blob Storage容器名稱。 |
folderPath |
指定容器內檔案所在的路徑。 |
connectionSpec.id |
Azure Blob Storage來源的連線規格ID。 此ID已固定為: 4c10e202-c428-4796-9208-5f1f5732b1cf 。 |
若要透過以服務主體為基礎的驗證連線,請提供下列專案的值: serviceEndpoint
、servicePrincipalId
、servicePrincipalKey
、accountKind
、tenant
、container
以及folderPath
。
code language-shell |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 7-row-2 8-row-2 | |
---|---|
參數 | 說明 |
serviceEndpoint |
Azure Blob Storage帳戶的端點URL。 通常格式為: https://{ACCOUNT_NAME}.blob.core.windows.net 。 |
servicePrincipalId |
用於驗證的Azure Active Directory (AAD)服務主體的使用者端/應用程式ID。 |
servicePrincipalKey |
與Azure服務主體關聯的使用者端密碼或密碼。 |
accountKind |
Azure Blob Storage帳戶的型別。 通用值包括Storage (一般用途V1)、StorageV2 (一般用途V2)、BlobStorage 和BlockBlobStorage 。 |
tenant |
註冊服務主體的Azure Active Directory (AAD)租使用者ID。 |
container |
儲存資料檔的Azure Blob Storage容器名稱。 |
folderPath |
指定容器內檔案所在的路徑。 |
connectionSpec.id |
Azure Blob Storage來源的連線規格ID。 此ID已固定為: 4c10e202-c428-4796-9208-5f1f5732b1cf 。 |
成功的回應會傳回新建立的基礎連線的詳細資料,包括其唯一識別碼(id
)。 建立來源連線的下一個步驟需要此ID。
{
"id": "4cb0c374-d3bb-4557-b139-5712880adc55",
"etag": "\"1700c57b-0000-0200-0000-5e3b3f440000\""
}
後續步驟
依照本教學課程,您已使用API建立Blob連線,且已取得唯一ID作為回應本文的一部分。 您可以使用此連線ID來使用Flow Service API🔗探索雲端儲存空間。