Tuesday, November 28, 2023

ADF Programmability

Sample invocations with responses:

PUT https://management.azure.com/subscriptions/656e67c6-f810-4ea6-8b89-636dd0b6774c/resourceGroups/rg-temp/providers/Microsoft.DataFactory/factories/rajamadf1/linkedservices/AmazonS3LinkedService?api-version=2018-06-01?factoryName=rajamadf1&linkedServiceName=AmazonS3LinkedService&resourceGroupName=rg-temp&subscriptionId=656e67c6-f810-4ea6-8b89-636dd0b6774c&api-version=2018-06-01

Headers:

Content-Type: application/json

Authorization: Bearer

RequestBody:

{

              properties: {

          "type": "AmazonS3",

          "typeProperties": {

             "connectionString": {

                 "type": "SecureString",

                 "value": "https://b67.s3.us-east-1.amazonaws.com/20231114_183657.jpg?response-content-disposition=inline&X-Amz-Security-Token=Token1&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20231127T011622Z&X-Amz-SignedHeaders=host&X-Amz-Expires=43200&X-Amz-Credential=ASIAWBUSJVLECCOOMERM%2F20231127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=29874c234eab5d9416e1158d3e5ba8513f163227b538258a295f78a35bcae1ee"

             }

          }

        }

}

 

Response:

Code: 200

Headers:

cache-control: no-cache

content-type: application/json; charset=utf-8

date: Mon, 27 Nov 2023 01:17:16 GMT

expires: -1

pragma: no-cache

server: Kestrel

x-ms-correlation-request-id: 235732c1-d0b1-402a-a3ee-d64366b8207d

x-ms-ratelimit-remaining-subscription-writes: 1199

x-ms-request-id: 235732c1-d0b1-402a-a3ee-d64366b8207d

x-ms-routing-request-id: WESTUS2:20231127T011716Z:235732c1-d0b1-402a-a3ee-d64366b8207d

 

Body:

{

  "id": "/subscriptions/656e67c6-f810-4ea6-8b89-636dd0b6774c/resourceGroups/rg-temp/providers/Microsoft.DataFactory/factories/rajamadf1/linkedservices/AmazonS3LinkedService",

  "name": "AmazonS3LinkedService",

  "type": "Microsoft.DataFactory/factories/linkedservices",

  "properties": {

    "type": "AmazonS3",

    "typeProperties": {

      "connectionString": {

        "type": "SecureString",

        "value": "**********"

      }

    }

  },

  "etag": "9e06116d-0000-0100-0000-6563ee1c0000"

}

 

Sample REST call to trigger a run:

POST https://management.azure.com/subscriptions/656e67c6-f810-4ea6-8b89-636dd0b6774c/resourceGroups/rg-temp/providers/Microsoft.DataFactory/factories/rajamadf1/pipelines/pipeline1/createRun?api-version=2018-06-01

Authorization: Bearer <token>

Content-type: application/json

 

Response:

Code: 200

Headers

cache-control: no-cache

content-type: application/json; charset=utf-8

date: Mon, 27 Nov 2023 01:56:03 GMT

expires: -1

pragma: no-cache

server: Kestrel

x-ms-correlation-request-id: cd5087fd-a9e9-4997-8ccc-d896788dc19f

x-ms-ratelimit-remaining-subscription-writes: 1199

x-ms-request-id: cd5087fd-a9e9-4997-8ccc-d896788dc19f

x-ms-routing-request-id: WESTUS2:20231127T015604Z:cd5087fd-a9e9-4997-8ccc-d896788dc19f

 

Body:

{

  "runId": "e62d495e-cadb-4294-b466-619ec7e5961f"

}

 

 

These sample REST calls are also available via CLI command usages when viewed with the –debug and –verbose option.

For example,

az datafactory dataset create --factory-name rajamadf1 --name AmazonS3SourceDataset1 --linked-service-name AmazonS3LinkedService1 --type AmazonS3Object --schema "{ \"type\": \"object\", \"properties\": { \"fileName\": { \"type\": \"string\" } } }" --structure "{ \"type\": \"object\", \"properties\": { \"fileName\": { \"type\": \"string\" } } }" --debug --verbose

 

No comments:

Post a Comment