Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR track2_@azure/arm-datafactory] [Azure Data Factory] Support rest-based connectors in ADF (I) #19311

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 6 additions & 39 deletions sdk/datafactory/arm-datafactory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,11 @@
## Release History

### 10.0.0-beta.2 (Unreleased)

#### Features Added

#### Breaking Changes

#### Bugs Fixed

#### Other Changes

### 10.0.0-beta.1 (2021-11-23)

**Features**

- Interface DataFlowReference has a new optional parameter parameters
- Interface Transformation has a new optional parameter dataset
- Interface Transformation has a new optional parameter linkedService
- Type Alias FtpReadSettings has a new parameter disableChunking
- Type Alias SftpReadSettings has a new parameter disableChunking

**Breaking Changes**

- Type Alias DataFlowSink no longer has parameter dataset
- Type Alias DataFlowSink no longer has parameter linkedService
- Type Alias DataFlowSource no longer has parameter dataset
- Type Alias DataFlowSource no longer has parameter linkedService
- Type Alias Flowlet no longer has parameter additionalProperties
# Release History

### 9.0.0-beta.1 (2021-11-10)
## 10.0.0 (2021-12-14)

This is the first preview for the new version of the `@azure/arm-datafactory` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
The package of @azure/arm-datafactory is using our next generation design principles since version 10.0.0, which contains breaking changes.

While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).

**Noteworthy changes and features**
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
2 changes: 1 addition & 1 deletion sdk/datafactory/arm-datafactory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Azure Data Factory V2 management API provides a RESTful set of web services

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-datafactory) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-datafactory) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand Down
6 changes: 3 additions & 3 deletions sdk/datafactory/arm-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commit": "b81af692dbb8395672116d85805cbc9ad1432f3b",
"commit": "91c198e26991291a67ecb3aab163b255746d0b58",
"readme": "specification/datafactory/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/[email protected].15.20211116.1",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/[email protected].16.20211130.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/[email protected].15.20211116.1"
"use": "@autorest/[email protected].16.20211130.1"
}
18 changes: 4 additions & 14 deletions sdk/datafactory/arm-datafactory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for DataFactoryManagementClient.",
"version": "10.0.0-beta.2",
"engines": {
"node": ">=12.0.0"
},
"version": "10.0.0",
"engines": { "node": ">=12.0.0" },
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
Expand All @@ -16,13 +14,7 @@
"@azure/core-rest-pipeline": "^1.1.0",
"tslib": "^2.2.0"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
Expand All @@ -49,9 +41,7 @@
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
Expand Down

This file was deleted.

19 changes: 7 additions & 12 deletions sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1568,11 +1568,15 @@ export type DatabricksSparkPythonActivity = ExecutionActivity & {
};

// @public (undocumented)
export class DataFactoryManagementClient extends DataFactoryManagementClientContext {
export class DataFactoryManagementClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataFactoryManagementClientOptionalParams);
// (undocumented)
activityRuns: ActivityRuns;
// (undocumented)
apiVersion: string;
// (undocumented)
dataFlowDebugSession: DataFlowDebugSession;
// (undocumented)
dataFlows: DataFlows;
Expand Down Expand Up @@ -1607,22 +1611,13 @@ export class DataFactoryManagementClient extends DataFactoryManagementClientCont
// (undocumented)
privateLinkResources: PrivateLinkResources;
// (undocumented)
subscriptionId: string;
// (undocumented)
triggerRuns: TriggerRuns;
// (undocumented)
triggers: Triggers;
}

// @public (undocumented)
export class DataFactoryManagementClientContext extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataFactoryManagementClientOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
subscriptionId: string;
}

// @public
export interface DataFactoryManagementClientOptionalParams extends coreClient.ServiceClientOptions {
$host?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import * as coreClient from "@azure/core-client";
import * as coreAuth from "@azure/core-auth";
import {
OperationsImpl,
Expand Down Expand Up @@ -51,10 +52,13 @@ import {
PrivateEndpointConnection,
PrivateLinkResources
} from "./operationsInterfaces";
import { DataFactoryManagementClientContext } from "./dataFactoryManagementClientContext";
import { DataFactoryManagementClientOptionalParams } from "./models";

export class DataFactoryManagementClient extends DataFactoryManagementClientContext {
export class DataFactoryManagementClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;

/**
* Initializes a new instance of the DataFactoryManagementClient class.
* @param credentials Subscription credentials which uniquely identify client subscription.
Expand All @@ -66,7 +70,46 @@ export class DataFactoryManagementClient extends DataFactoryManagementClientCont
subscriptionId: string,
options?: DataFactoryManagementClientOptionalParams
) {
super(credentials, subscriptionId, options);
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");
}

// Initializing default values for options
if (!options) {
options = {};
}
const defaults: DataFactoryManagementClientOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};

const packageDetails = `azsdk-js-arm-datafactory/10.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;

if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
},
baseUri: options.endpoint || "https://management.azure.com"
};
super(optionsWithDefaults);
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2018-06-01";
this.operations = new OperationsImpl(this);
this.factories = new FactoriesImpl(this);
this.exposureControl = new ExposureControlImpl(this);
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion sdk/datafactory/arm-datafactory/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
/// <reference lib="esnext.asynciterable" />
export * from "./models";
export { DataFactoryManagementClient } from "./dataFactoryManagementClient";
export { DataFactoryManagementClientContext } from "./dataFactoryManagementClientContext";
export * from "./operationsInterfaces";
11 changes: 1 addition & 10 deletions sdk/datafactory/arm-datafactory/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2854,6 +2854,7 @@ export const DataFlow: coreClient.CompositeMapper = {
modelProperties: {
type: {
serializedName: "type",
required: true,
type: {
name: "String"
}
Expand Down Expand Up @@ -3393,11 +3394,9 @@ export const ManagedVirtualNetworkListResponse: coreClient.CompositeMapper = {
};

export const ManagedVirtualNetwork: coreClient.CompositeMapper = {
serializedName: "ManagedVirtualNetwork",
type: {
name: "Composite",
className: "ManagedVirtualNetwork",
uberParent: "ManagedVirtualNetwork",
additionalProperties: { type: { name: "Object" } },
modelProperties: {
vNetId: {
Expand All @@ -3417,8 +3416,6 @@ export const ManagedVirtualNetwork: coreClient.CompositeMapper = {
}
}
};
ManagedVirtualNetwork.type.polymorphicDiscriminator =
ManagedVirtualNetwork.type.polymorphicDiscriminator;

export const ManagedPrivateEndpointListResponse: coreClient.CompositeMapper = {
type: {
Expand Down Expand Up @@ -3449,11 +3446,9 @@ export const ManagedPrivateEndpointListResponse: coreClient.CompositeMapper = {
};

export const ManagedPrivateEndpoint: coreClient.CompositeMapper = {
serializedName: "ManagedPrivateEndpoint",
type: {
name: "Composite",
className: "ManagedPrivateEndpoint",
uberParent: "ManagedPrivateEndpoint",
additionalProperties: { type: { name: "Object" } },
modelProperties: {
connectionState: {
Expand Down Expand Up @@ -3503,8 +3498,6 @@ export const ManagedPrivateEndpoint: coreClient.CompositeMapper = {
}
}
};
ManagedPrivateEndpoint.type.polymorphicDiscriminator =
ManagedPrivateEndpoint.type.polymorphicDiscriminator;

export const ConnectionStateProperties: coreClient.CompositeMapper = {
type: {
Expand Down Expand Up @@ -26906,8 +26899,6 @@ export let discriminators = {
Activity: Activity,
Trigger: Trigger,
DataFlow: DataFlow,
"ManagedVirtualNetwork.ManagedVirtualNetwork": ManagedVirtualNetwork,
"ManagedPrivateEndpoint.ManagedPrivateEndpoint": ManagedPrivateEndpoint,
SecretBase: SecretBase,
Credential: Credential,
DatasetLocation: DatasetLocation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ActivityRuns } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { DataFactoryManagementClientContext } from "../dataFactoryManagementClientContext";
import { DataFactoryManagementClient } from "../dataFactoryManagementClient";
import {
RunFilterParameters,
ActivityRunsQueryByPipelineRunOptionalParams,
Expand All @@ -19,13 +19,13 @@ import {

/** Class containing ActivityRuns operations. */
export class ActivityRunsImpl implements ActivityRuns {
private readonly client: DataFactoryManagementClientContext;
private readonly client: DataFactoryManagementClient;

/**
* Initialize a new instance of the class ActivityRuns class.
* @param client Reference to the service client
*/
constructor(client: DataFactoryManagementClientContext) {
constructor(client: DataFactoryManagementClient) {
this.client = client;
}

Expand Down
Loading