Skip to content

Commit 8cbacce

Browse files
authored
Refresh synapse aritifacts to the latest v6 version (Azure#24420)
* Refresh to the latest v6 version * Update api review * Update CHANGELOG.md
1 parent 696ec98 commit 8cbacce

24 files changed

+1134
-580
lines changed

sdk/synapse/synapse-artifacts/CHANGELOG.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
# Release History
22

3-
## 1.0.0-beta.12 (Unreleased)
3+
## 1.0.0-beta.12 (2023-01-10)
44

55
### Features Added
66

7-
### Breaking Changes
7+
- Added `workspaceResourceId` to AzureSynapseArtifactsLinkedServiceTypeProperties.
8+
- Added `pythonCodeReference`, `filesV2`, `scanFolder`, `configurationType`, `targetSparkConfiguration` and `sparkConfig` properties to SparkJobActivity.
9+
- Added `authHeaders` proprety to RestServiceLinkedService.
10+
- Added new apis of Pause/Resume for Synapse Link.
11+
- Added PowerBIWorkspaceLinkedService.
812

9-
### Bugs Fixed
13+
### Breaking Changes
1014

11-
### Other Changes
15+
- Renamed API `createOrUpdateLinkConnection` to `createOrUpdate` in `LinkConnectionOperations`.
16+
- Renamed API `deleteLinkConnection` to `delete` in `LinkConnectionOperations`.
17+
- Renamed API `getLinkConnection` to `get` in `LinkConnectionOperations`.
18+
- Renamed API `listLinkConnectionsByWorkspace` to `listByWorkspace` in `LinkConnectionOperations`.
1219

1320
## 1.0.0-beta.11 (2022-09-21)
1421

1522
### Features Added
1623

1724
- Updated to `@azure/core-tracing` 1.0.
18-
- add a set of new LinkedService types.
25+
- Added a set of new LinkedService types.
1926

2027
## 1.0.0-beta.10 (2022-04-18)
2128

sdk/synapse/synapse-artifacts/review/synapse-artifacts.api.md

Lines changed: 64 additions & 18 deletions
Large diffs are not rendered by default.

sdk/synapse/synapse-artifacts/src/artifactsClient.ts

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,31 +107,40 @@ export class ArtifactsClient extends coreClient.ServiceClient {
107107
userAgentOptions: {
108108
userAgentPrefix
109109
},
110-
baseUri: options.endpoint ?? options.baseUri ?? "{endpoint}"
110+
endpoint: options.endpoint ?? options.baseUri ?? "{endpoint}"
111111
};
112112
super(optionsWithDefaults);
113113

114+
let bearerTokenAuthenticationPolicyFound: boolean = false;
114115
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
115116
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
116-
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
117+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
117118
(pipelinePolicy) =>
118119
pipelinePolicy.name ===
119120
coreRestPipeline.bearerTokenAuthenticationPolicyName
120121
);
121-
if (!bearerTokenAuthenticationPolicyFound) {
122-
this.pipeline.removePolicy({
123-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
124-
});
125-
this.pipeline.addPolicy(
126-
coreRestPipeline.bearerTokenAuthenticationPolicy({
127-
scopes: `${optionsWithDefaults.baseUri}/.default`,
128-
challengeCallbacks: {
129-
authorizeRequestOnChallenge:
130-
coreClient.authorizeRequestOnClaimChallenge
131-
}
132-
})
133-
);
134-
}
122+
}
123+
if (
124+
!options ||
125+
!options.pipeline ||
126+
options.pipeline.getOrderedPolicies().length == 0 ||
127+
!bearerTokenAuthenticationPolicyFound
128+
) {
129+
this.pipeline.removePolicy({
130+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
131+
});
132+
this.pipeline.addPolicy(
133+
coreRestPipeline.bearerTokenAuthenticationPolicy({
134+
credential: credentials,
135+
scopes:
136+
optionsWithDefaults.credentialScopes ??
137+
`${optionsWithDefaults.endpoint}/.default`,
138+
challengeCallbacks: {
139+
authorizeRequestOnChallenge:
140+
coreClient.authorizeRequestOnClaimChallenge
141+
}
142+
})
143+
);
135144
}
136145
// Parameter assignments
137146
this.endpoint = endpoint;

sdk/synapse/synapse-artifacts/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
/// <reference lib="esnext.asynciterable" />
10+
export { getContinuationToken } from "./pagingHelper";
1011
export * from "./models";
1112
export { ArtifactsClient } from "./artifactsClient";
1213
export * from "./operationsInterfaces";

sdk/synapse/synapse-artifacts/src/models/index.ts

Lines changed: 87 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ export type LinkedServiceUnion =
227227
| AzureFunctionLinkedService
228228
| SnowflakeLinkedService
229229
| SharePointOnlineListLinkedService
230-
| AzureSynapseArtifactsLinkedService;
230+
| AzureSynapseArtifactsLinkedService
231+
| PowerBIWorkspaceLinkedService;
231232
export type ActivityUnion =
232233
| Activity
233234
| ControlActivityUnion
@@ -677,7 +678,7 @@ export interface LinkConnectionDetailedStatus {
677678
startTime?: any;
678679
/** Link connection stop time */
679680
stopTime?: any;
680-
/** Link connection status */
681+
/** Link connection status, please refer to this [articles](https://learn.microsoft.com/azure/synapse-analytics/synapse-link/sql-database-synapse-link#monitoring) for details. */
681682
status?: string;
682683
/** Link connection's corresponding continuous run id */
683684
continuousRunId?: string;
@@ -735,7 +736,7 @@ export interface LinkConnectionQueryTableStatus {
735736
export interface LinkTableStatus {
736737
/** ID provided by the client */
737738
id?: string;
738-
/** Link table status */
739+
/** Link table status, please refer to this [articles](https://learn.microsoft.com/azure/synapse-analytics/synapse-link/sql-database-synapse-link#monitoring) for details. */
739740
status?: string;
740741
/** Link table error message */
741742
errorMessage?: string;
@@ -1344,7 +1345,8 @@ export interface LinkedService {
13441345
| "AzureFunction"
13451346
| "Snowflake"
13461347
| "SharePointOnlineList"
1347-
| "AzureSynapseArtifacts";
1348+
| "AzureSynapseArtifacts"
1349+
| "PowerBIWorkspace";
13481350
/** Describes unknown properties. The value of an unknown property can be of "any" type. */
13491351
[property: string]: any;
13501352
/** The integration runtime reference. */
@@ -1372,7 +1374,7 @@ export interface DataFlowStagingInfo {
13721374
/** Staging linked service reference. */
13731375
linkedService?: LinkedServiceReference;
13741376
/** Folder path for staging blob. */
1375-
folderPath?: string;
1377+
folderPath?: any;
13761378
}
13771379

13781380
/** Data flow debug settings. */
@@ -3588,6 +3590,14 @@ export interface ScriptActivityTypePropertiesLogSettings {
35883590
logLocationSettings?: LogLocationSettings;
35893591
}
35903592

3593+
/** Spark configuration reference. */
3594+
export interface SparkConfigurationParametrizationReference {
3595+
/** Spark configuration reference type. */
3596+
type: SparkConfigurationReferenceType;
3597+
/** Reference spark configuration name. Type: string (or Expression with resultType string). */
3598+
referenceName: any;
3599+
}
3600+
35913601
/** The workflow trigger recurrence. */
35923602
export interface ScheduleTriggerRecurrence {
35933603
/** Describes unknown properties. The value of an unknown property can be of "any" type. */
@@ -5806,6 +5816,8 @@ export interface RestServiceLinkedService extends LinkedService {
58065816
userName?: any;
58075817
/** The password used in Basic authentication type. */
58085818
password?: SecretBaseUnion;
5819+
/** The additional HTTP headers in the request to RESTful API used for authorization. Type: object (or Expression with resultType object). */
5820+
authHeaders?: any;
58095821
/** The application's client ID used in AadServicePrincipal authentication type. */
58105822
servicePrincipalId?: any;
58115823
/** The application's key used in AadServicePrincipal authentication type. */
@@ -7091,6 +7103,18 @@ export interface AzureSynapseArtifactsLinkedService extends LinkedService {
70917103
endpoint: any;
70927104
/** Required to specify MSI, if using system assigned managed identity as authentication method. Type: string (or Expression with resultType string). */
70937105
authentication?: any;
7106+
/** The resource ID of the Synapse workspace. The format should be: /subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}. Type: string (or Expression with resultType string). */
7107+
workspaceResourceId?: any;
7108+
}
7109+
7110+
/** Power BI Workspace linked service. */
7111+
export interface PowerBIWorkspaceLinkedService extends LinkedService {
7112+
/** Polymorphic discriminator, which specifies the different types this object can be */
7113+
type: "PowerBIWorkspace";
7114+
/** The Power BI workspace id. */
7115+
workspaceId: string;
7116+
/** The tenant id to which the Power BI workspace belongs. */
7117+
tenantId: string;
70947118
}
70957119

70967120
/** Base class for all control activities like IfCondition, ForEach , Until. */
@@ -8327,7 +8351,7 @@ export interface SnowflakeSource extends CopySource {
83278351
/** Snowflake Sql query. Type: string (or Expression with resultType string). */
83288352
query?: any;
83298353
/** Snowflake export settings. */
8330-
exportSettings?: SnowflakeExportCopyCommand;
8354+
exportSettings: SnowflakeExportCopyCommand;
83318355
}
83328356

83338357
/** A copy activity Azure Databricks Delta Lake source. */
@@ -9620,10 +9644,16 @@ export interface SynapseSparkJobDefinitionActivity extends ExecutionActivity {
96209644
arguments?: any[];
96219645
/** The main file used for the job, which will override the 'file' of the spark job definition you provide. Type: string (or Expression with resultType string). */
96229646
file?: any;
9647+
/** Scanning subfolders from the root folder of the main definition file, these files will be added as reference files. The folders named 'jars', 'pyFiles', 'files' or 'archives' will be scanned, and the folders name are case sensitive. Type: boolean (or Expression with resultType boolean). */
9648+
scanFolder?: any;
96239649
/** The fully-qualified identifier or the main class that is in the main definition file, which will override the 'className' of the spark job definition you provide. Type: string (or Expression with resultType string). */
96249650
className?: any;
9625-
/** Additional files used for reference in the main definition file, which will override the 'files' of the spark job definition you provide. */
9651+
/** (Deprecated. Please use pythonCodeReference and filesV2) Additional files used for reference in the main definition file, which will override the 'files' of the spark job definition you provide. */
96269652
files?: any[];
9653+
/** Additional python code files used for reference in the main definition file, which will override the 'pyFiles' of the spark job definition you provide. */
9654+
pythonCodeReference?: any[];
9655+
/** Additional files used for reference in the main definition file, which will override the 'jars' and 'files' of the spark job definition you provide. */
9656+
filesV2?: any[];
96279657
/** The name of the big data pool which will be used to execute the spark batch job, which will override the 'targetBigDataPool' of the spark job definition you provide. */
96289658
targetBigDataPool?: BigDataPoolParametrizationReference;
96299659
/** Number of core and memory to be used for executors allocated in the specified Spark pool for the job, which will be used for overriding 'executorCores' and 'executorMemory' of the spark job definition you provide. Type: string (or Expression with resultType string). */
@@ -9632,8 +9662,14 @@ export interface SynapseSparkJobDefinitionActivity extends ExecutionActivity {
96329662
conf?: any;
96339663
/** Number of core and memory to be used for driver allocated in the specified Spark pool for the job, which will be used for overriding 'driverCores' and 'driverMemory' of the spark job definition you provide. Type: string (or Expression with resultType string). */
96349664
driverSize?: any;
9635-
/** Number of executors to launch for this job, which will override the 'numExecutors' of the spark job definition you provide. */
9636-
numExecutors?: number;
9665+
/** Number of executors to launch for this job, which will override the 'numExecutors' of the spark job definition you provide. Type: integer (or Expression with resultType integer). */
9666+
numExecutors?: any;
9667+
/** The type of the spark config. */
9668+
configurationType?: ConfigurationType;
9669+
/** The spark configuration of the spark job. */
9670+
targetSparkConfiguration?: SparkConfigurationParametrizationReference;
9671+
/** Spark configuration property. */
9672+
sparkConfig?: { [propertyName: string]: any };
96379673
}
96389674

96399675
/** Trigger that creates pipeline runs periodically, on schedule. */
@@ -12322,6 +12358,27 @@ export enum KnownScriptActivityLogDestination {
1232212358
*/
1232312359
export type ScriptActivityLogDestination = string;
1232412360

12361+
/** Known values of {@link ConfigurationType} that the service accepts. */
12362+
export enum KnownConfigurationType {
12363+
/** Default */
12364+
Default = "Default",
12365+
/** Customized */
12366+
Customized = "Customized",
12367+
/** Artifact */
12368+
Artifact = "Artifact"
12369+
}
12370+
12371+
/**
12372+
* Defines values for ConfigurationType. \
12373+
* {@link KnownConfigurationType} can be used interchangeably with ConfigurationType,
12374+
* this enum contains the known values that the service supports.
12375+
* ### Known values supported by the service
12376+
* **Default** \
12377+
* **Customized** \
12378+
* **Artifact**
12379+
*/
12380+
export type ConfigurationType = string;
12381+
1232512382
/** Known values of {@link RecurrenceFrequency} that the service accepts. */
1232612383
export enum KnownRecurrenceFrequency {
1232712384
/** NotSpecified */
@@ -12853,28 +12910,28 @@ export type DayOfWeek =
1285312910
| "Saturday";
1285412911

1285512912
/** Optional parameters. */
12856-
export interface LinkConnectionListLinkConnectionsByWorkspaceOptionalParams
12913+
export interface LinkConnectionListByWorkspaceOptionalParams
1285712914
extends coreClient.OperationOptions {}
1285812915

12859-
/** Contains response data for the listLinkConnectionsByWorkspace operation. */
12860-
export type LinkConnectionListLinkConnectionsByWorkspaceResponse = LinkConnectionListResponse;
12916+
/** Contains response data for the listByWorkspace operation. */
12917+
export type LinkConnectionListByWorkspaceResponse = LinkConnectionListResponse;
1286112918

1286212919
/** Optional parameters. */
12863-
export interface LinkConnectionCreateOrUpdateLinkConnectionOptionalParams
12920+
export interface LinkConnectionCreateOrUpdateOptionalParams
1286412921
extends coreClient.OperationOptions {}
1286512922

12866-
/** Contains response data for the createOrUpdateLinkConnection operation. */
12867-
export type LinkConnectionCreateOrUpdateLinkConnectionResponse = LinkConnectionResource;
12923+
/** Contains response data for the createOrUpdate operation. */
12924+
export type LinkConnectionCreateOrUpdateResponse = LinkConnectionResource;
1286812925

1286912926
/** Optional parameters. */
12870-
export interface LinkConnectionGetLinkConnectionOptionalParams
12927+
export interface LinkConnectionGetOptionalParams
1287112928
extends coreClient.OperationOptions {}
1287212929

12873-
/** Contains response data for the getLinkConnection operation. */
12874-
export type LinkConnectionGetLinkConnectionResponse = LinkConnectionResource;
12930+
/** Contains response data for the get operation. */
12931+
export type LinkConnectionGetResponse = LinkConnectionResource;
1287512932

1287612933
/** Optional parameters. */
12877-
export interface LinkConnectionDeleteLinkConnectionOptionalParams
12934+
export interface LinkConnectionDeleteOptionalParams
1287812935
extends coreClient.OperationOptions {}
1287912936

1288012937
/** Optional parameters. */
@@ -12915,11 +12972,19 @@ export interface LinkConnectionUpdateLandingZoneCredentialOptionalParams
1291512972
extends coreClient.OperationOptions {}
1291612973

1291712974
/** Optional parameters. */
12918-
export interface LinkConnectionListLinkConnectionsByWorkspaceNextOptionalParams
12975+
export interface LinkConnectionPauseOptionalParams
12976+
extends coreClient.OperationOptions {}
12977+
12978+
/** Optional parameters. */
12979+
export interface LinkConnectionResumeOptionalParams
12980+
extends coreClient.OperationOptions {}
12981+
12982+
/** Optional parameters. */
12983+
export interface LinkConnectionListByWorkspaceNextOptionalParams
1291912984
extends coreClient.OperationOptions {}
1292012985

12921-
/** Contains response data for the listLinkConnectionsByWorkspaceNext operation. */
12922-
export type LinkConnectionListLinkConnectionsByWorkspaceNextResponse = LinkConnectionListResponse;
12986+
/** Contains response data for the listByWorkspaceNext operation. */
12987+
export type LinkConnectionListByWorkspaceNextResponse = LinkConnectionListResponse;
1292312988

1292412989
/** Optional parameters. */
1292512990
export interface KqlScriptsGetAllOptionalParams

0 commit comments

Comments
 (0)