建立 Google Cloud Storage 基礎連線使用 Flow Service API
基礎連線代表來源和Adobe Experience Platform之間已驗證的連線。
本教學課程將逐步引導您完成建立基礎連線的步驟。 Google Cloud Storage 使用 Flow Service API.
快速入門
本指南需要您實際瞭解下列Adobe Experience Platform元件:
以下小節提供您需要瞭解的其他資訊,才能使用成功連線到Google雲端儲存空間帳戶 Flow Service API。
收集必要的認證
為了 Flow Service 以連線您的 Google Cloud Storage 帳戶,您必須提供下列連線屬性的值:
accessKeyId
secretAccessKey
bucketName
folderPath
如需這些值的詳細資訊,請參閱 Google雲端儲存空間HMAC金鑰 指南。 有關如何產生您自己的存取金鑰ID和秘密存取金鑰的步驟,請參閱 Google Cloud Storage 概觀.
使用平台API
如需如何成功呼叫Platform API的詳細資訊,請參閱以下指南中的 Platform API快速入門.
建立基礎連線
基礎連線會保留您的來源和平台之間的資訊,包括來源的驗證認證、連線的目前狀態,以及您唯一的基本連線ID。 基本連線ID可讓您瀏覽和瀏覽來源內的檔案,並識別您要擷取的特定專案,包括其資料型別和格式的資訊。
POST若要建立基本連線ID,請向 /connections
端點,同時提供 Google Cloud Storage 要求引數中的驗證認證。
API格式
POST /connections
要求
下列要求會建立 Google Cloud Storage:
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/connections' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Google Cloud Storage connection",
"description": "Connector for Google Cloud Storage",
"auth": {
"specName": "Basic Authentication for google-cloud",
"params": {
"accessKeyId": "accessKeyId",
"secretAccessKey": "secretAccessKey",
"bucketName": "acme-google-cloud-bucket",
"folderPath": "/acme/customers/sales"
}
},
"connectionSpec": {
"id": "32e8f412-cdf7-464c-9885-78184cb113fd",
"version": "1.0"
}
}'
auth.params.accessKeyId
auth.params.secretAccessKey
auth.params.bucketName
auth.params.folderPath
connectionSpec.id
32e8f412-cdf7-464c-9885-78184cb113fd
回應
成功回應會傳回新建立連線的詳細資料,包括其唯一識別碼(id
)。 在下一個教學課程中,探索您的雲端儲存空間資料時,需要此ID。
{
"id": "4cb0c374-d3bb-4557-b139-5712880adc55",
"etag": "\"6507cfd8-0000-0200-0000-5e18fc600000\""
}
後續步驟
依照本教學課程,您已建立 Google Cloud Storage 使用API和唯一ID的連線已取得為回應本文的一部分。 您可以使用此連線ID來 使用流量服務API探索雲端儲存空間.