Skip to content

Commit b21aa6d

Browse files
author
SDKAuto
committed
CodeGen from PR 14763 in Azure/azure-rest-api-specs
Merge 6d38c221c7b95edb6654d0627bec43dfda14e557 into 2737ef83c687cd61721ece7af713921d0df2485a
1 parent 713d433 commit b21aa6d

File tree

57 files changed

+358
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+358
-70
lines changed

sdk/synapse/arm-synapse/README.md

Lines changed: 59 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,103 @@
11
## Azure SynapseManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK for SynapseManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for SynapseManagementClient.
44

55
### Currently supported environments
66

7-
- Node.js version 6.x.x or higher
8-
- Browser JavaScript
7+
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

10-
### How to Install
10+
### Prerequisites
1111

12+
You must have an [Azure subscription](https://azure.microsoft.com/free/).
13+
14+
### How to install
15+
16+
To use this SDK in your project, you will need to install two packages.
17+
- `@azure/arm-synapse` that contains the client.
18+
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
19+
20+
Install both packages using the below command:
1221
```bash
13-
npm install @azure/arm-synapse
22+
npm install --save @azure/arm-synapse @azure/identity
1423
```
24+
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
25+
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
1526

1627
### How to use
1728

18-
#### nodejs - client creation and get bigDataPools as an example written in TypeScript.
29+
- If you are writing a client side browser application,
30+
- Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
31+
- Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
32+
- If you are writing a server side application,
33+
- [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
34+
- Complete the set up steps required by the credential if any.
35+
- Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
1936

20-
##### Install @azure/ms-rest-nodeauth
21-
22-
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23-
```bash
24-
npm install @azure/ms-rest-nodeauth@"^3.0.0"
25-
```
37+
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
38+
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
39+
#### nodejs - Authentication, client creation, and get bigDataPools as an example written in JavaScript.
2640

2741
##### Sample code
2842

29-
While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
30-
```typescript
31-
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
43+
```javascript
44+
const { DefaultAzureCredential } = require("@azure/identity");
3245
const { SynapseManagementClient } = require("@azure/arm-synapse");
3346
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3447

35-
msRestNodeAuth.interactiveLogin().then((creds) => {
36-
const client = new SynapseManagementClient(creds, subscriptionId);
37-
const resourceGroupName = "testresourceGroupName";
38-
const workspaceName = "testworkspaceName";
39-
const bigDataPoolName = "testbigDataPoolName";
40-
client.bigDataPools.get(resourceGroupName, workspaceName, bigDataPoolName).then((result) => {
41-
console.log("The result is:");
42-
console.log(result);
43-
});
48+
// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
49+
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
50+
const creds = new DefaultAzureCredential();
51+
const client = new SynapseManagementClient(creds, subscriptionId);
52+
const resourceGroupName = "testresourceGroupName";
53+
const workspaceName = "testworkspaceName";
54+
const bigDataPoolName = "testbigDataPoolName";
55+
client.bigDataPools.get(resourceGroupName, workspaceName, bigDataPoolName).then((result) => {
56+
console.log("The result is:");
57+
console.log(result);
4458
}).catch((err) => {
59+
console.log("An error occurred:");
4560
console.error(err);
4661
});
4762
```
4863

49-
#### browser - Authentication, client creation and get bigDataPools as an example written in JavaScript.
64+
#### browser - Authentication, client creation, and get bigDataPools as an example written in JavaScript.
5065

51-
##### Install @azure/ms-rest-browserauth
52-
53-
```bash
54-
npm install @azure/ms-rest-browserauth
55-
```
66+
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
67+
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
68+
- Note down the client Id from the previous step and use it in the browser sample below.
5669

5770
##### Sample code
5871

59-
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
60-
6172
- index.html
73+
6274
```html
6375
<!DOCTYPE html>
6476
<html lang="en">
6577
<head>
6678
<title>@azure/arm-synapse sample</title>
67-
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
6879
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
69-
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
80+
<script src="node_modules/@azure/identity/dist/index.js"></script>
7081
<script src="node_modules/@azure/arm-synapse/dist/arm-synapse.js"></script>
7182
<script type="text/javascript">
7283
const subscriptionId = "<Subscription_Id>";
73-
const authManager = new msAuth.AuthManager({
84+
// Create credentials using the `@azure/identity` package.
85+
// Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
86+
const credential = new InteractiveBrowserCredential(
87+
{
7488
clientId: "<client id for your Azure AD app>",
7589
tenant: "<optional tenant for your organization>"
7690
});
77-
authManager.finalizeLogin().then((res) => {
78-
if (!res.isLoggedIn) {
79-
// may cause redirects
80-
authManager.login();
81-
}
82-
const client = new Azure.ArmSynapse.SynapseManagementClient(res.creds, subscriptionId);
83-
const resourceGroupName = "testresourceGroupName";
84-
const workspaceName = "testworkspaceName";
85-
const bigDataPoolName = "testbigDataPoolName";
86-
client.bigDataPools.get(resourceGroupName, workspaceName, bigDataPoolName).then((result) => {
87-
console.log("The result is:");
88-
console.log(result);
89-
}).catch((err) => {
90-
console.log("An error occurred:");
91-
console.error(err);
92-
});
91+
const client = new Azure.ArmSynapse.SynapseManagementClient(creds, subscriptionId);
92+
const resourceGroupName = "testresourceGroupName";
93+
const workspaceName = "testworkspaceName";
94+
const bigDataPoolName = "testbigDataPoolName";
95+
client.bigDataPools.get(resourceGroupName, workspaceName, bigDataPoolName).then((result) => {
96+
console.log("The result is:");
97+
console.log(result);
98+
}).catch((err) => {
99+
console.log("An error occurred:");
100+
console.error(err);
93101
});
94102
</script>
95103
</head>

sdk/synapse/arm-synapse/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"description": "SynapseManagementClient Library with typescript type definitions for node.js and browser.",
55
"version": "5.1.0",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^2.0.1",
8-
"@azure/ms-rest-js": "^2.0.4",
7+
"@azure/ms-rest-azure-js": "^2.1.0",
8+
"@azure/ms-rest-js": "^2.2.0",
9+
"@azure/core-auth": "^1.1.4",
910
"tslib": "^1.10.0"
1011
},
1112
"keywords": [
@@ -20,7 +21,7 @@
2021
"module": "./esm/synapseManagementClient.js",
2122
"types": "./esm/synapseManagementClient.d.ts",
2223
"devDependencies": {
23-
"typescript": "^3.5.3",
24+
"typescript": "^3.6.0",
2425
"rollup": "^1.18.0",
2526
"rollup-plugin-node-resolve": "^5.2.0",
2627
"rollup-plugin-sourcemaps": "^0.4.2",

sdk/synapse/arm-synapse/src/models/bigDataPoolsMappers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export {
1717
BigDataPoolResourceInfoListResult,
1818
CmdkeySetup,
1919
ComponentSetup,
20+
CspWorkspaceAdminProperties,
2021
CustomerManagedKeyDetails,
2122
CustomSetupBase,
2223
DataLakeStorageAccountDetails,
@@ -44,6 +45,7 @@ export {
4445
IntegrationRuntimeSsisProperties,
4546
IntegrationRuntimeVNetProperties,
4647
IpFirewallRuleInfo,
48+
KekIdentityProperties,
4749
Key,
4850
LibraryInfo,
4951
LibraryRequirements,

sdk/synapse/arm-synapse/src/models/dataMaskingPoliciesMappers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export {
1515
BigDataPoolResourceInfo,
1616
CmdkeySetup,
1717
ComponentSetup,
18+
CspWorkspaceAdminProperties,
1819
CustomerManagedKeyDetails,
1920
CustomSetupBase,
2021
DataLakeStorageAccountDetails,
@@ -42,6 +43,7 @@ export {
4243
IntegrationRuntimeSsisProperties,
4344
IntegrationRuntimeVNetProperties,
4445
IpFirewallRuleInfo,
46+
KekIdentityProperties,
4547
Key,
4648
LibraryInfo,
4749
LibraryRequirements,

sdk/synapse/arm-synapse/src/models/dataMaskingRulesMappers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export {
1515
BigDataPoolResourceInfo,
1616
CmdkeySetup,
1717
ComponentSetup,
18+
CspWorkspaceAdminProperties,
1819
CustomerManagedKeyDetails,
1920
CustomSetupBase,
2021
DataLakeStorageAccountDetails,
@@ -43,6 +44,7 @@ export {
4344
IntegrationRuntimeSsisProperties,
4445
IntegrationRuntimeVNetProperties,
4546
IpFirewallRuleInfo,
47+
KekIdentityProperties,
4648
Key,
4749
LibraryInfo,
4850
LibraryRequirements,

sdk/synapse/arm-synapse/src/models/extendedSqlPoolBlobAuditingPoliciesMappers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {
1616
CloudError,
1717
CmdkeySetup,
1818
ComponentSetup,
19+
CspWorkspaceAdminProperties,
1920
CustomerManagedKeyDetails,
2021
CustomSetupBase,
2122
DataLakeStorageAccountDetails,
@@ -41,6 +42,7 @@ export {
4142
IntegrationRuntimeSsisProperties,
4243
IntegrationRuntimeVNetProperties,
4344
IpFirewallRuleInfo,
45+
KekIdentityProperties,
4446
Key,
4547
LibraryInfo,
4648
LibraryRequirements,

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

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export interface BigDataPoolResourceInfo extends TrackedResource {
225225
nodeSize?: NodeSize;
226226
/**
227227
* The kind of nodes that the Big Data pool provides. Possible values include: 'None',
228-
* 'MemoryOptimized'
228+
* 'MemoryOptimized', 'HardwareAcceleratedFPGA', 'HardwareAcceleratedGPU'
229229
*/
230230
nodeSizeFamily?: NodeSizeFamily;
231231
/**
@@ -387,7 +387,7 @@ export interface IpFirewallRuleProperties {
387387
/**
388388
* IP firewall rule
389389
*/
390-
export interface IpFirewallRuleInfo extends BaseResource {
390+
export interface IpFirewallRuleInfo extends ProxyResource {
391391
/**
392392
* The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to
393393
* startIpAddress
@@ -2264,7 +2264,7 @@ export interface SqlPoolPatchInfo {
22642264
* Configuration for metadata sync
22652265
* @summary Metadata sync configuration
22662266
*/
2267-
export interface MetadataSyncConfig extends BaseResource {
2267+
export interface MetadataSyncConfig extends ProxyResource {
22682268
/**
22692269
* Indicates whether the metadata sync is enabled or disabled
22702270
*/
@@ -4049,6 +4049,20 @@ export interface WorkspaceKeyDetails {
40494049
keyVaultUrl?: string;
40504050
}
40514051

4052+
/**
4053+
* Key encryption key properties
4054+
*/
4055+
export interface KekIdentityProperties {
4056+
/**
4057+
* User assigned identity resource Id
4058+
*/
4059+
userAssignedIdentity?: string;
4060+
/**
4061+
* Boolean specifying whether to use system assigned identity or not
4062+
*/
4063+
useSystemAssignedIdentity?: any;
4064+
}
4065+
40524066
/**
40534067
* Details of the customer managed key associated with the workspace
40544068
*/
@@ -4062,6 +4076,10 @@ export interface CustomerManagedKeyDetails {
40624076
* The key object of the workspace
40634077
*/
40644078
key?: WorkspaceKeyDetails;
4079+
/**
4080+
* Key encryption key
4081+
*/
4082+
kekIdentity?: KekIdentityProperties;
40654083
}
40664084

40674085
/**
@@ -4150,6 +4168,16 @@ export interface PurviewConfiguration {
41504168
purviewResourceId?: string;
41514169
}
41524170

4171+
/**
4172+
* Initial workspace AAD admin properties for a CSP subscription
4173+
*/
4174+
export interface CspWorkspaceAdminProperties {
4175+
/**
4176+
* AAD object ID of initial workspace admin
4177+
*/
4178+
initialWorkspaceAdminObjectId?: string;
4179+
}
4180+
41534181
/**
41544182
* The workspace managed identity
41554183
*/
@@ -4248,10 +4276,14 @@ export interface Workspace extends TrackedResource {
42484276
*/
42494277
readonly adlaResourceId?: string;
42504278
/**
4251-
* Enable or Disable pubic network access to workspace. Possible values include: 'Enabled',
4279+
* Enable or Disable public network access to workspace. Possible values include: 'Enabled',
42524280
* 'Disabled'
42534281
*/
42544282
publicNetworkAccess?: WorkspacePublicNetworkAccess;
4283+
/**
4284+
* Initial workspace AAD admin properties for a CSP subscription
4285+
*/
4286+
cspWorkspaceAdminProperties?: CspWorkspaceAdminProperties;
42554287
/**
42564288
* Identity of the workspace
42574289
*/
@@ -4261,7 +4293,7 @@ export interface Workspace extends TrackedResource {
42614293
/**
42624294
* Workspace active directory administrator
42634295
*/
4264-
export interface WorkspaceAadAdminInfo extends BaseResource {
4296+
export interface WorkspaceAadAdminInfo extends ProxyResource {
42654297
/**
42664298
* Tenant ID of the workspace active directory administrator
42674299
*/
@@ -4318,7 +4350,7 @@ export interface WorkspacePatchInfo {
43184350
*/
43194351
encryption?: EncryptionDetails;
43204352
/**
4321-
* Enable or Disable pubic network access to workspace. Possible values include: 'Enabled',
4353+
* Enable or Disable public network access to workspace. Possible values include: 'Enabled',
43224354
* 'Disabled'
43234355
*/
43244356
publicNetworkAccess?: WorkspacePublicNetworkAccess;
@@ -5055,11 +5087,12 @@ export type NodeSize = 'None' | 'Small' | 'Medium' | 'Large' | 'XLarge' | 'XXLar
50555087

50565088
/**
50575089
* Defines values for NodeSizeFamily.
5058-
* Possible values include: 'None', 'MemoryOptimized'
5090+
* Possible values include: 'None', 'MemoryOptimized', 'HardwareAcceleratedFPGA',
5091+
* 'HardwareAcceleratedGPU'
50595092
* @readonly
50605093
* @enum {string}
50615094
*/
5062-
export type NodeSizeFamily = 'None' | 'MemoryOptimized';
5095+
export type NodeSizeFamily = 'None' | 'MemoryOptimized' | 'HardwareAcceleratedFPGA' | 'HardwareAcceleratedGPU';
50635096

50645097
/**
50655098
* Defines values for ProvisioningState.
@@ -6817,6 +6850,26 @@ export type PrivateEndpointConnectionsPrivateLinkHubListResponse = PrivateEndpoi
68176850
};
68186851
};
68196852

6853+
/**
6854+
* Contains response data for the get operation.
6855+
*/
6856+
export type PrivateEndpointConnectionsPrivateLinkHubGetResponse = PrivateEndpointConnectionForPrivateLinkHub & {
6857+
/**
6858+
* The underlying HTTP response.
6859+
*/
6860+
_response: msRest.HttpResponse & {
6861+
/**
6862+
* The response body as text (string format)
6863+
*/
6864+
bodyAsText: string;
6865+
6866+
/**
6867+
* The response body as parsed JSON or XML
6868+
*/
6869+
parsedBody: PrivateEndpointConnectionForPrivateLinkHub;
6870+
};
6871+
};
6872+
68206873
/**
68216874
* Contains response data for the listNext operation.
68226875
*/

0 commit comments

Comments
 (0)