From 6c2c280e34036587b9be61955f822969e3669612 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 7 Jul 2021 01:53:53 +0000 Subject: [PATCH] CodeGen from PR 15090 in Azure/azure-rest-api-specs Removing duplicate package ID-2021-04-01-preview (#15090) --- sdk/databricks/arm-databricks/LICENSE.txt | 2 +- sdk/databricks/arm-databricks/README.md | 115 +- sdk/databricks/arm-databricks/package.json | 29 +- .../arm-databricks/rollup.config.js | 24 +- .../src/azureDatabricksManagementClient.ts | 55 + ...azureDatabricksManagementClientContext.ts} | 31 +- .../arm-databricks/src/databricksClient.ts | 44 - .../arm-databricks/src/models/index.ts | 1287 ++++++++++++++--- .../arm-databricks/src/models/mappers.ts | 975 ++++++++++++- .../src/models/operationsMappers.ts | 17 +- .../arm-databricks/src/models/parameters.ts | 51 +- .../privateEndpointConnectionsMappers.ts | 43 + .../src/models/privateLinkResourcesMappers.ts | 43 + .../src/models/vNetPeeringMappers.ts | 43 + .../src/models/workspacesMappers.ts | 50 +- .../arm-databricks/src/operations/index.ts | 8 +- .../src/operations/operations.ts | 18 +- .../operations/privateEndpointConnections.ts | 339 +++++ .../src/operations/privateLinkResources.ts | 203 +++ .../src/operations/vNetPeering.ts | 333 +++++ .../src/operations/workspaces.ts | 33 +- sdk/databricks/arm-databricks/tsconfig.json | 2 +- 22 files changed, 3321 insertions(+), 424 deletions(-) create mode 100644 sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts rename sdk/databricks/arm-databricks/src/{databricksClientContext.ts => azureDatabricksManagementClientContext.ts} (55%) delete mode 100644 sdk/databricks/arm-databricks/src/databricksClient.ts create mode 100644 sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts create mode 100644 sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts create mode 100644 sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts create mode 100644 sdk/databricks/arm-databricks/src/operations/vNetPeering.ts diff --git a/sdk/databricks/arm-databricks/LICENSE.txt b/sdk/databricks/arm-databricks/LICENSE.txt index a70e8cf66038..2d3163745319 100644 --- a/sdk/databricks/arm-databricks/LICENSE.txt +++ b/sdk/databricks/arm-databricks/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/databricks/arm-databricks/README.md b/sdk/databricks/arm-databricks/README.md index a98459c8bb4d..b95c4cee0248 100644 --- a/sdk/databricks/arm-databricks/README.md +++ b/sdk/databricks/arm-databricks/README.md @@ -1,93 +1,101 @@ -## Azure DatabricksClient SDK for JavaScript +## Azure AzureDatabricksManagementClient SDK for JavaScript -This package contains an isomorphic SDK for DatabricksClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureDatabricksManagementClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-databricks` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: +```bash +npm install --save @azure/arm-databricks @azure/identity ``` -npm install @azure/arm-databricks -``` +> **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. +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. ### How to use -#### nodejs - Authentication, client creation and get workspaces as an example written in TypeScript. +- If you are writing a client side browser application, + - 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. + - 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. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +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. +#### nodejs - Authentication, client creation, and get workspaces as an example written in JavaScript. ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { DatabricksClient, DatabricksModels, DatabricksMappers } from "@azure/arm-databricks"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { AzureDatabricksManagementClient } = require("@azure/arm-databricks"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new DatabricksClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const workspaceName = "testworkspaceName"; - client.workspaces.get(resourceGroupName, workspaceName).then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new AzureDatabricksManagementClient(creds, subscriptionId); +const resourceGroupName = "testresourceGroupName"; +const workspaceName = "testworkspaceName"; +client.workspaces.get(resourceGroupName, workspaceName).then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and get workspaces as an example written in JavaScript. +#### browser - Authentication, client creation, and get workspaces as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - 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. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-databricks sample - - + @@ -99,5 +107,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdatabricks%2Farm-databricks%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/databricks/arm-databricks/README.png) diff --git a/sdk/databricks/arm-databricks/package.json b/sdk/databricks/arm-databricks/package.json index bf9a5c43a413..6c63d64b15ae 100644 --- a/sdk/databricks/arm-databricks/package.json +++ b/sdk/databricks/arm-databricks/package.json @@ -1,12 +1,13 @@ { "name": "@azure/arm-databricks", "author": "Microsoft Corporation", - "description": "DatabricksClient Library with typescript type definitions for node.js and browser.", + "description": "AzureDatabricksManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -17,21 +18,22 @@ ], "license": "MIT", "main": "./dist/arm-databricks.js", - "module": "./esm/databricksClient.js", - "types": "./esm/databricksClient.d.ts", + "module": "./esm/azureDatabricksManagementClient.js", + "types": "./esm/azureDatabricksManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/databricks/arm-databricks", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/databricks/arm-databricks", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +45,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/databricks/arm-databricks/rollup.config.js b/sdk/databricks/arm-databricks/rollup.config.js index 10910c284024..c802420682fb 100644 --- a/sdk/databricks/arm-databricks/rollup.config.js +++ b/sdk/databricks/arm-databricks/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/databricksClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/azureDatabricksManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-databricks.js", format: "umd", @@ -15,17 +21,17 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts new file mode 100644 index 000000000000..5d55e69868a9 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { AzureDatabricksManagementClientContext } from "./azureDatabricksManagementClientContext"; + + +class AzureDatabricksManagementClient extends AzureDatabricksManagementClientContext { + // Operation groups + workspaces: operations.Workspaces; + operations: operations.Operations; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; + vNetPeering: operations.VNetPeering; + + /** + * Initializes a new instance of the AzureDatabricksManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureDatabricksManagementClientOptions) { + super(credentials, subscriptionId, options); + this.workspaces = new operations.Workspaces(this); + this.operations = new operations.Operations(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.vNetPeering = new operations.VNetPeering(this); + } +} + +// Operation Specifications + +export { + AzureDatabricksManagementClient, + AzureDatabricksManagementClientContext, + Models as AzureDatabricksManagementModels, + Mappers as AzureDatabricksManagementMappers +}; +export * from "./operations"; diff --git a/sdk/databricks/arm-databricks/src/databricksClientContext.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts similarity index 55% rename from sdk/databricks/arm-databricks/src/databricksClientContext.ts rename to sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts index be3305b83c0f..eacfe25656d0 100644 --- a/sdk/databricks/arm-databricks/src/databricksClientContext.ts +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -11,22 +10,27 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-databricks"; -const packageVersion = "0.1.0"; +const packageVersion = "1.1.0"; -export class DatabricksClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; +export class AzureDatabricksManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; - apiVersion?: string; /** - * Initializes a new instance of the DatabricksClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * Initializes a new instance of the AzureDatabricksManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DatabricksClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureDatabricksManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -37,14 +41,13 @@ export class DatabricksClientContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2018-04-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -52,10 +55,10 @@ export class DatabricksClientContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/databricks/arm-databricks/src/databricksClient.ts b/sdk/databricks/arm-databricks/src/databricksClient.ts deleted file mode 100644 index ef1cc667e629..000000000000 --- a/sdk/databricks/arm-databricks/src/databricksClient.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { DatabricksClientContext } from "./databricksClientContext"; - - -class DatabricksClient extends DatabricksClientContext { - // Operation groups - workspaces: operations.Workspaces; - operations: operations.Operations; - - /** - * Initializes a new instance of the DatabricksClient class. - * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The ID of the target subscription. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DatabricksClientOptions) { - super(credentials, subscriptionId, options); - this.workspaces = new operations.Workspaces(this); - this.operations = new operations.Operations(this); - } -} - -// Operation Specifications - -export { - DatabricksClient, - DatabricksClientContext, - Models as DatabricksModels, - Mappers as DatabricksMappers -}; -export * from "./operations"; diff --git a/sdk/databricks/arm-databricks/src/models/index.ts b/sdk/databricks/arm-databricks/src/models/index.ts index 5b622f068da9..356dc9ebbf76 100644 --- a/sdk/databricks/arm-databricks/src/models/index.ts +++ b/sdk/databricks/arm-databricks/src/models/index.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,307 +11,1153 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * The Value. + */ +export interface WorkspaceCustomStringParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value: string; +} + +/** + * The value which should be used for this field. + */ +export interface WorkspaceCustomBooleanParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value: boolean; +} + +/** + * The object that contains details of encryption used on the workspace. + */ +export interface Encryption { + /** + * The encryption keySource (provider). Possible values (case-insensitive): Default, + * Microsoft.Keyvault. Possible values include: 'Default', 'Microsoft.Keyvault'. Default value: + * 'Default'. + */ + keySource?: KeySource; + /** + * The name of KeyVault key. + */ + keyName?: string; + /** + * The version of KeyVault key. + */ + keyVersion?: string; + /** + * The Uri of KeyVault. + */ + keyVaultUri?: string; +} + +/** + * The object that contains details of encryption used on the workspace. + */ +export interface WorkspaceEncryptionParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value?: Encryption; +} + +/** + * The value which should be used for this field. + */ +export interface WorkspaceCustomObjectParameter { + /** + * The type of variable that this is. Possible values include: 'Bool', 'Object', 'String' + */ + type?: CustomParameterType; + /** + * The value which should be used for this field. + */ + value: any; +} + +/** + * Custom Parameters used for Cluster Creation. + */ +export interface WorkspaceCustomParameters { + /** + * The ID of a Azure Machine Learning workspace to link with Databricks workspace + */ + amlWorkspaceId?: WorkspaceCustomStringParameter; + /** + * The ID of a Virtual Network where this Databricks Cluster should be created + */ + customVirtualNetworkId?: WorkspaceCustomStringParameter; + /** + * The name of a Public Subnet within the Virtual Network + */ + customPublicSubnetName?: WorkspaceCustomStringParameter; + /** + * The name of the Private Subnet within the Virtual Network + */ + customPrivateSubnetName?: WorkspaceCustomStringParameter; + /** + * Should the Public IP be Disabled? + */ + enableNoPublicIp?: WorkspaceCustomBooleanParameter; + /** + * Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public + * IP). + */ + loadBalancerBackendPoolName?: WorkspaceCustomStringParameter; + /** + * Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) + * workspace. + */ + loadBalancerId?: WorkspaceCustomStringParameter; + /** + * Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets. + */ + natGatewayName?: WorkspaceCustomStringParameter; + /** + * Name of the Public IP for No Public IP workspace with managed vNet. + */ + publicIpName?: WorkspaceCustomStringParameter; + /** + * Prepare the workspace for encryption. Enables the Managed Identity for managed storage + * account. + */ + prepareEncryption?: WorkspaceCustomBooleanParameter; + /** + * Contains the encryption details for Customer-Managed Key (CMK) enabled workspace. + */ + encryption?: WorkspaceEncryptionParameter; + /** + * A boolean indicating whether or not the DBFS root file system will be enabled with secondary + * layer of encryption with platform managed keys for data at rest. + */ + requireInfrastructureEncryption?: WorkspaceCustomBooleanParameter; + /** + * Default DBFS storage account name. + */ + storageAccountName?: WorkspaceCustomStringParameter; + /** + * Storage account SKU name, ex: Standard_GRS, Standard_LRS. Refer https://aka.ms/storageskus for + * valid inputs. + */ + storageAccountSkuName?: WorkspaceCustomStringParameter; + /** + * Address prefix for Managed virtual network. Default value for this input is 10.139. + */ + vnetAddressPrefix?: WorkspaceCustomStringParameter; + /** + * Tags applied to resources under Managed resource group. These can be updated by updating tags + * at workspace level. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceTags?: WorkspaceCustomObjectParameter; +} /** - * @interface - * An interface representing WorkspaceProviderAuthorization. * The workspace provider authorization. - * */ export interface WorkspaceProviderAuthorization { /** - * @member {string} principalId The provider's principal identifier. This is - * the identity that the provider will use to call ARM to manage the - * workspace resources. + * The provider's principal identifier. This is the identity that the provider will use to call + * ARM to manage the workspace resources. */ principalId: string; /** - * @member {string} roleDefinitionId The provider's role definition - * identifier. This role will define all the permissions that the provider - * must have on the workspace's container resource group. This role - * definition cannot have permission to delete the resource group. + * The provider's role definition identifier. This role will define all the permissions that the + * provider must have on the workspace's container resource group. This role definition cannot + * have permission to delete the resource group. */ roleDefinitionId: string; } /** - * @interface - * An interface representing Sku. + * Provides details of the entity that created/updated the workspace. + */ +export interface CreatedBy { + /** + * The Object ID that created the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly oid?: string; + /** + * The Personal Object ID corresponding to the object ID above + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly puid?: string; + /** + * The application ID of the application that initiated the creation of the workspace. For + * example, Azure Portal. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly applicationId?: string; +} + +/** + * The Managed Identity details for storage account. + */ +export interface ManagedIdentityConfiguration { + /** + * The objectId of the Managed Identity that is linked to the Managed Storage account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant Id where the Managed Identity is created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The type of Identity created. It can be either SystemAssigned or UserAssigned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Key Vault input properties for encryption. + */ +export interface EncryptionV2KeyVaultProperties { + /** + * The Uri of KeyVault. + */ + keyVaultUri: string; + /** + * The name of KeyVault key. + */ + keyName: string; + /** + * The version of KeyVault key. + */ + keyVersion: string; +} + +/** + * The object that contains details of encryption used on the workspace. + */ +export interface EncryptionV2 { + /** + * Key Vault input properties for encryption. + */ + keyVaultProperties?: EncryptionV2KeyVaultProperties; +} + +/** + * Encryption entities for databricks workspace resource. + */ +export interface EncryptionEntitiesDefinition { + /** + * Encryption properties for the databricks managed services. + */ + managedServices?: EncryptionV2; +} + +/** + * Encryption properties for databricks workspace + */ +export interface WorkspacePropertiesEncryption { + /** + * Encryption entities definition for the workspace. + */ + entities: EncryptionEntitiesDefinition; +} + +/** + * The private endpoint property of a private endpoint connection + */ +export interface PrivateEndpoint { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * The current state of a private endpoint connection + */ +export interface PrivateLinkServiceConnectionState { + /** + * The status of a private endpoint connection. Possible values include: 'Pending', 'Approved', + * 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStatus; + /** + * The description for the current state of a private endpoint connection + */ + description?: string; + /** + * Actions required for a private endpoint connection + */ + actionRequired?: string; +} + +/** + * The properties of a private endpoint connection + */ +export interface PrivateEndpointConnectionProperties { + /** + * Private endpoint. Private endpoint + */ + privateEndpoint?: PrivateEndpoint; + /** + * Private link service service connection state. Private endpoint connection state + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** + * The private endpoint connection of a workspace + */ +export interface PrivateEndpointConnection extends BaseResource { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The private endpoint connection properties. + */ + properties: PrivateEndpointConnectionProperties; +} + +/** * SKU for the resource. - * */ export interface Sku { /** - * @member {string} name The SKU name. + * The SKU name. */ name: string; /** - * @member {string} [tier] The SKU tier. + * The SKU tier. */ tier?: string; } /** - * @interface - * An interface representing Resource. + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** * The core properties of ARM resources - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Fully qualified resource Id for the resource. Ex - + * Fully qualified resource Id for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The type of the resource. Ex- - * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing TrackedResource. * The resource model definition for a ARM tracked top level resource - * - * @extends Resource */ export interface TrackedResource extends Resource { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * Resource tags. */ tags?: { [propertyName: string]: string }; /** - * @member {string} location The geo-location where the resource lives + * The geo-location where the resource lives */ location: string; } /** - * @interface - * An interface representing Workspace. * Information about workspace. - * - * @extends TrackedResource */ export interface Workspace extends TrackedResource { /** - * @member {string} managedResourceGroupId The managed resource group Id. + * The managed resource group Id. */ managedResourceGroupId: string; /** - * @member {any} [parameters] Name and value pairs that define the workspace - * parameters. + * The workspace's custom parameters. */ - parameters?: any; + parameters?: WorkspaceCustomParameters; /** - * @member {ProvisioningState} [provisioningState] The workspace provisioning - * state. Possible values include: 'Accepted', 'Running', 'Ready', - * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - * 'Succeeded', 'Updating' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The workspace provisioning state. Possible values include: 'Accepted', 'Running', 'Ready', + * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * @member {string} [uiDefinitionUri] The blob URI where the UI definition - * file is located. + * The blob URI where the UI definition file is located. */ uiDefinitionUri?: string; /** - * @member {WorkspaceProviderAuthorization[]} [authorizations] The workspace - * provider authorizations. + * The workspace provider authorizations. */ authorizations?: WorkspaceProviderAuthorization[]; /** - * @member {Sku} [sku] The SKU of the resource. + * Indicates the Object ID, PUID and Application ID of entity that created the workspace. + */ + createdBy?: CreatedBy; + /** + * Indicates the Object ID, PUID and Application ID of entity that last updated the workspace. + */ + updatedBy?: CreatedBy; + /** + * Specifies the date and time when the workspace is created. + */ + createdDateTime?: Date; + /** + * The unique identifier of the databricks workspace in databricks control plane. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceId?: string; + /** + * The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly workspaceUrl?: string; + /** + * The details of Managed Identity of Storage Account + */ + storageAccountIdentity?: ManagedIdentityConfiguration; + /** + * Encryption properties for databricks workspace + */ + encryption?: WorkspacePropertiesEncryption; + /** + * Private endpoint connections created on the workspace + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The network access type for accessing workspace. Set value to disabled to access workspace + * only via private link. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * Gets or sets a value indicating whether data plane (clusters) to control plane communication + * happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. + * 'NoAzureServiceRules' value is for internal use only. Possible values include: 'AllRules', + * 'NoAzureDatabricksRules', 'NoAzureServiceRules' + */ + requiredNsgRules?: RequiredNsgRules; + /** + * The SKU of the resource. */ sku?: Sku; + /** + * The system metadata relating to this resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + +/** + * An update to a workspace. + */ +export interface WorkspaceUpdate { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing ErrorDetail. + * @summary Error details. + */ +export interface ErrorDetail { + /** + * The error's code. + */ + code: string; + /** + * A human readable error message. + */ + message: string; + /** + * Indicates which property in the request is responsible for the error. + */ + target?: string; } /** - * @interface - * An interface representing WorkspaceUpdate. - * An update to a workspace. - * + * An interface representing ErrorInfo. + * @summary The code and message for an error. + */ +export interface ErrorInfo { + /** + * A machine readable error code. + */ + code: string; + /** + * A human readable error message. + */ + message: string; + /** + * error details. + */ + details?: ErrorDetail[]; + /** + * Inner error details if they exist. + */ + innererror?: string; +} + +/** + * Contains details when the response code indicates an error. + * @summary Error response. + */ +export interface ErrorResponse { + /** + * The error details. + */ + error: ErrorInfo; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.ResourceProvider + */ + provider?: string; + /** + * Resource on which the operation is performed. + */ + resource?: string; + /** + * Operation type: Read, write, delete, etc. + */ + operation?: string; +} + +/** + * REST API operation + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * The properties for a group information object + */ +export interface GroupIdInformationProperties { + /** + * The group id + */ + groupId?: string; + /** + * The required members for a specific group id + */ + requiredMembers?: string[]; + /** + * The required DNS zones for a specific group id + */ + requiredZoneNames?: string[]; +} + +/** + * The group information for creating a private endpoint on a workspace + */ +export interface GroupIdInformation extends Resource { + /** + * The group id properties. + */ + properties: GroupIdInformationProperties; +} + +/** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ +export interface VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork { + /** + * The Id of the databricks virtual network. + */ + id?: string; +} + +/** + * AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual + * network. + */ +export interface AddressSpace { + /** + * A list of address blocks reserved for this virtual network in CIDR notation. + */ + addressPrefixes?: string[]; +} + +/** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ +export interface VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork { + /** + * The Id of the remote virtual network. + */ + id?: string; +} + +/** + * Peerings in a VirtualNetwork resource + */ +export interface VirtualNetworkPeering extends BaseResource { + /** + * Whether the VMs in the local virtual network space would be able to access the VMs in remote + * virtual network space. + */ + allowVirtualNetworkAccess?: boolean; + /** + * Whether the forwarded traffic from the VMs in the local virtual network will be + * allowed/disallowed in remote virtual network. + */ + allowForwardedTraffic?: boolean; + /** + * If gateway links can be used in remote virtual networking to link to this virtual network. + */ + allowGatewayTransit?: boolean; + /** + * If remote gateways can be used on this virtual network. If the flag is set to true, and + * allowGatewayTransit on remote peering is also true, virtual network will use gateways of + * remote virtual network for transit. Only one peering can have this flag set to true. This flag + * cannot be set if virtual network already has a gateway. + */ + useRemoteGateways?: boolean; + /** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ + databricksVirtualNetwork?: VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork; + /** + * The reference to the databricks virtual network address space. + */ + databricksAddressSpace?: AddressSpace; + /** + * The remote virtual network should be in the same region. See here to learn more + * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + */ + remoteVirtualNetwork: VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork; + /** + * The reference to the remote virtual network address space. + */ + remoteAddressSpace?: AddressSpace; + /** + * The status of the virtual network peering. Possible values include: 'Initiated', 'Connected', + * 'Disconnected' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly peeringState?: PeeringState; + /** + * The provisioning state of the virtual network peering resource. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: PeeringProvisioningState; + /** + * Name of the virtual network peering resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * type of the virtual network peering resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * An interface representing AzureDatabricksManagementClientOptions. + */ +export interface AzureDatabricksManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * List of workspaces. + * @extends Array + */ +export interface WorkspaceListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list Resource Provider operations. It contains a list of operations and + * a URL link to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * The available private link resources for a workspace + * @extends Array + */ +export interface PrivateLinkResourcesList extends Array { + /** + * The URL to get the next set of private link resources. + */ + nextLink?: string; +} + +/** + * @interface + * List of private link connections. + * @extends Array + */ +export interface PrivateEndpointConnectionsList extends Array { + /** + * The URL to get the next set of endpoint connections. + */ + nextLink?: string; +} + +/** + * @interface + * Gets all virtual network peerings under a workspace. + * @extends Array + */ +export interface VirtualNetworkPeeringList extends Array { + /** + * URL to get the next set of virtual network peering list results if there are any. + */ + nextLink?: string; +} + +/** + * Defines values for CustomParameterType. + * Possible values include: 'Bool', 'Object', 'String' + * @readonly + * @enum {string} + */ +export type CustomParameterType = 'Bool' | 'Object' | 'String'; + +/** + * Defines values for KeySource. + * Possible values include: 'Default', 'Microsoft.Keyvault' + * @readonly + * @enum {string} + */ +export type KeySource = 'Default' | 'Microsoft.Keyvault'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', + * 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Accepted' | 'Running' | 'Ready' | 'Creating' | 'Created' | 'Deleting' | 'Deleted' | 'Canceled' | 'Failed' | 'Succeeded' | 'Updating'; + +/** + * Defines values for PrivateLinkServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Updating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Updating' | 'Deleting' | 'Failed'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + +/** + * Defines values for RequiredNsgRules. + * Possible values include: 'AllRules', 'NoAzureDatabricksRules', 'NoAzureServiceRules' + * @readonly + * @enum {string} + */ +export type RequiredNsgRules = 'AllRules' | 'NoAzureDatabricksRules' | 'NoAzureServiceRules'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for PeeringProvisioningState. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PeeringProvisioningState = 'Succeeded' | 'Updating' | 'Deleting' | 'Failed'; + +/** + * Defines values for PeeringState. + * Possible values include: 'Initiated', 'Connected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PeeringState = 'Initiated' | 'Connected' | 'Disconnected'; + +/** + * Contains response data for the get operation. + */ +export type WorkspacesGetResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type WorkspacesCreateOrUpdateResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type WorkspacesUpdateResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. */ -export interface WorkspaceUpdate { +export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * The underlying HTTP response. */ - tags?: { [propertyName: string]: string }; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing ErrorDetail. - * @summary Error details. - * - */ -export interface ErrorDetail { - /** - * @member {string} code The error's code. - */ - code: string; - /** - * @member {string} message A human readable error message. - */ - message: string; - /** - * @member {string} [target] Indicates which property in the request is - * responsible for the error. - */ - target?: string; -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing ErrorInfo. - * @summary The code and message for an error. - * + * Contains response data for the beginUpdate operation. */ -export interface ErrorInfo { - /** - * @member {string} code A machine readable error code. - */ - code: string; - /** - * @member {string} message A human readable error message. - */ - message: string; - /** - * @member {ErrorDetail[]} [details] error details. - */ - details?: ErrorDetail[]; +export type WorkspacesBeginUpdateResponse = Workspace & { /** - * @member {string} [innererror] Inner error details if they exist. + * The underlying HTTP response. */ - innererror?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing ErrorResponse. - * @summary Error response. - * - * Contains details when the response code indicates an error. - * + * Contains response data for the listByResourceGroupNext operation. */ -export interface ErrorResponse { +export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { /** - * @member {ErrorInfo} error The error details. + * The underlying HTTP response. */ - error: ErrorInfo; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * Contains response data for the listBySubscriptionNext operation. */ -export interface OperationDisplay { - /** - * @member {string} [provider] Service provider: Microsoft.ResourceProvider - */ - provider?: string; - /** - * @member {string} [resource] Resource on which the operation is performed. - */ - resource?: string; +export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { /** - * @member {string} [operation] Operation type: Read, write, delete, etc. + * The underlying HTTP response. */ - operation?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing Operation. - * REST API operation - * + * Contains response data for the list operation. */ -export interface Operation { - /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} - */ - name?: string; +export type OperationsListResponse = OperationListResult & { /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The underlying HTTP response. */ - display?: OperationDisplay; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; /** - * @interface - * An interface representing DatabricksClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the listNext operation. */ -export interface DatabricksClientOptions extends AzureServiceClientOptions { +export type OperationsListNextResponse = OperationListResult & { /** - * @member {string} [baseUri] + * The underlying HTTP response. */ - baseUri?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; /** - * @interface - * An interface representing the WorkspaceListResult. - * List of workspaces. - * - * @extends Array + * Contains response data for the list operation. */ -export interface WorkspaceListResult extends Array { +export type PrivateLinkResourcesListResponse = PrivateLinkResourcesList & { /** - * @member {string} [nextLink] The URL to use for getting the next set of - * results. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourcesList; + }; +}; /** - * @interface - * An interface representing the OperationListResult. - * Result of the request to list Resource Provider operations. It contains a - * list of operations and a URL link to get the next set of results. - * - * @extends Array + * Contains response data for the get operation. */ -export interface OperationListResult extends Array { +export type PrivateLinkResourcesGetResponse = GroupIdInformation & { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ProvisioningState. - * Possible values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', - * 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' - * @readonly - * @enum {string} - */ -export type ProvisioningState = 'Accepted' | 'Running' | 'Ready' | 'Creating' | 'Created' | 'Deleting' | 'Deleted' | 'Canceled' | 'Failed' | 'Succeeded' | 'Updating'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: GroupIdInformation; + }; +}; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type WorkspacesGetResponse = Workspace & { +export type PrivateLinkResourcesListNextResponse = PrivateLinkResourcesList & { /** * The underlying HTTP response. */ @@ -322,17 +1166,18 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateLinkResourcesList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the list operation. */ -export type WorkspacesCreateOrUpdateResponse = Workspace & { +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionsList & { /** * The underlying HTTP response. */ @@ -341,17 +1186,18 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateEndpointConnectionsList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the get operation. */ -export type WorkspacesUpdateResponse = Workspace & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -360,17 +1206,18 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the create operation. */ -export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { +export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -379,17 +1226,18 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the beginCreate operation. */ -export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { +export type PrivateEndpointConnectionsBeginCreateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -398,17 +1246,18 @@ export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listNext operation. */ -export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { +export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionsList & { /** * The underlying HTTP response. */ @@ -417,17 +1266,18 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: PrivateEndpointConnectionsList; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the get operation. */ -export type WorkspacesBeginUpdateResponse = Workspace & { +export type VNetPeeringGetResponse = VirtualNetworkPeering & { /** * The underlying HTTP response. */ @@ -436,17 +1286,18 @@ export type WorkspacesBeginUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: VirtualNetworkPeering; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the createOrUpdate operation. */ -export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { +export type VNetPeeringCreateOrUpdateResponse = VirtualNetworkPeering & { /** * The underlying HTTP response. */ @@ -455,17 +1306,18 @@ export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: VirtualNetworkPeering; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { +export type VNetPeeringListByWorkspaceResponse = VirtualNetworkPeeringList & { /** * The underlying HTTP response. */ @@ -474,17 +1326,18 @@ export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: VirtualNetworkPeeringList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type OperationsListResponse = OperationListResult & { +export type VNetPeeringBeginCreateOrUpdateResponse = VirtualNetworkPeering & { /** * The underlying HTTP response. */ @@ -493,17 +1346,18 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: VirtualNetworkPeering; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByWorkspaceNext operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type VNetPeeringListByWorkspaceNextResponse = VirtualNetworkPeeringList & { /** * The underlying HTTP response. */ @@ -512,9 +1366,10 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: VirtualNetworkPeeringList; }; }; diff --git a/sdk/databricks/arm-databricks/src/models/mappers.ts b/sdk/databricks/arm-databricks/src/models/mappers.ts index 8d5caa24faef..ccaf8f4e0995 100644 --- a/sdk/databricks/arm-databricks/src/models/mappers.ts +++ b/sdk/databricks/arm-databricks/src/models/mappers.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,6 +12,256 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const WorkspaceCustomStringParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomStringParameter", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceCustomBooleanParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomBooleanParameter", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Encryption: msRest.CompositeMapper = { + serializedName: "Encryption", + type: { + name: "Composite", + className: "Encryption", + modelProperties: { + keySource: { + serializedName: "keySource", + defaultValue: 'Default', + type: { + name: "String" + } + }, + keyName: { + serializedName: "KeyName", + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyversion", + type: { + name: "String" + } + }, + keyVaultUri: { + serializedName: "keyvaulturi", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceEncryptionParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceEncryptionParameter", + type: { + name: "Composite", + className: "WorkspaceEncryptionParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Composite", + className: "Encryption" + } + } + } + } +}; + +export const WorkspaceCustomObjectParameter: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomObjectParameter", + type: { + name: "Composite", + className: "WorkspaceCustomObjectParameter", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "Object" + } + } + } + } +}; + +export const WorkspaceCustomParameters: msRest.CompositeMapper = { + serializedName: "WorkspaceCustomParameters", + type: { + name: "Composite", + className: "WorkspaceCustomParameters", + modelProperties: { + amlWorkspaceId: { + serializedName: "amlWorkspaceId", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + customVirtualNetworkId: { + serializedName: "customVirtualNetworkId", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + customPublicSubnetName: { + serializedName: "customPublicSubnetName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + customPrivateSubnetName: { + serializedName: "customPrivateSubnetName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + enableNoPublicIp: { + serializedName: "enableNoPublicIp", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter" + } + }, + loadBalancerBackendPoolName: { + serializedName: "loadBalancerBackendPoolName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + loadBalancerId: { + serializedName: "loadBalancerId", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + natGatewayName: { + serializedName: "natGatewayName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + publicIpName: { + serializedName: "publicIpName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + prepareEncryption: { + serializedName: "prepareEncryption", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter" + } + }, + encryption: { + serializedName: "encryption", + type: { + name: "Composite", + className: "WorkspaceEncryptionParameter" + } + }, + requireInfrastructureEncryption: { + serializedName: "requireInfrastructureEncryption", + type: { + name: "Composite", + className: "WorkspaceCustomBooleanParameter" + } + }, + storageAccountName: { + serializedName: "storageAccountName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + storageAccountSkuName: { + serializedName: "storageAccountSkuName", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + vnetAddressPrefix: { + serializedName: "vnetAddressPrefix", + type: { + name: "Composite", + className: "WorkspaceCustomStringParameter" + } + }, + resourceTags: { + readOnly: true, + serializedName: "resourceTags", + type: { + name: "Composite", + className: "WorkspaceCustomObjectParameter" + } + } + } + } +}; + export const WorkspaceProviderAuthorization: msRest.CompositeMapper = { serializedName: "WorkspaceProviderAuthorization", type: { @@ -38,6 +286,277 @@ export const WorkspaceProviderAuthorization: msRest.CompositeMapper = { } }; +export const CreatedBy: msRest.CompositeMapper = { + serializedName: "CreatedBy", + type: { + name: "Composite", + className: "CreatedBy", + modelProperties: { + oid: { + readOnly: true, + serializedName: "oid", + type: { + name: "Uuid" + } + }, + puid: { + readOnly: true, + serializedName: "puid", + type: { + name: "String" + } + }, + applicationId: { + readOnly: true, + serializedName: "applicationId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const ManagedIdentityConfiguration: msRest.CompositeMapper = { + serializedName: "ManagedIdentityConfiguration", + type: { + name: "Composite", + className: "ManagedIdentityConfiguration", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionV2KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "EncryptionV2_keyVaultProperties", + type: { + name: "Composite", + className: "EncryptionV2KeyVaultProperties", + modelProperties: { + keyVaultUri: { + required: true, + serializedName: "keyVaultUri", + type: { + name: "String" + } + }, + keyName: { + required: true, + serializedName: "keyName", + type: { + name: "String" + } + }, + keyVersion: { + required: true, + serializedName: "keyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionV2: msRest.CompositeMapper = { + serializedName: "EncryptionV2", + type: { + name: "Composite", + className: "EncryptionV2", + modelProperties: { + keySource: { + required: true, + isConstant: true, + serializedName: "keySource", + defaultValue: 'Microsoft.Keyvault', + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "EncryptionV2KeyVaultProperties" + } + } + } + } +}; + +export const EncryptionEntitiesDefinition: msRest.CompositeMapper = { + serializedName: "EncryptionEntitiesDefinition", + type: { + name: "Composite", + className: "EncryptionEntitiesDefinition", + modelProperties: { + managedServices: { + serializedName: "managedServices", + type: { + name: "Composite", + className: "EncryptionV2" + } + } + } + } +}; + +export const WorkspacePropertiesEncryption: msRest.CompositeMapper = { + serializedName: "WorkspaceProperties_encryption", + type: { + name: "Composite", + className: "WorkspacePropertiesEncryption", + modelProperties: { + entities: { + required: true, + serializedName: "entities", + defaultValue: {}, + type: { + name: "Composite", + className: "EncryptionEntitiesDefinition" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionRequired: { + serializedName: "actionRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -61,6 +580,52 @@ export const Sku: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -135,43 +700,125 @@ export const Workspace: msRest.CompositeMapper = { name: "String" } }, - parameters: { - serializedName: "properties.parameters", + parameters: { + serializedName: "properties.parameters", + type: { + name: "Composite", + className: "WorkspaceCustomParameters" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + uiDefinitionUri: { + serializedName: "properties.uiDefinitionUri", + type: { + name: "String" + } + }, + authorizations: { + serializedName: "properties.authorizations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceProviderAuthorization" + } + } + } + }, + createdBy: { + serializedName: "properties.createdBy", + type: { + name: "Composite", + className: "CreatedBy" + } + }, + updatedBy: { + serializedName: "properties.updatedBy", + type: { + name: "Composite", + className: "CreatedBy" + } + }, + createdDateTime: { + serializedName: "properties.createdDateTime", + type: { + name: "DateTime" + } + }, + workspaceId: { + readOnly: true, + serializedName: "properties.workspaceId", + type: { + name: "String" + } + }, + workspaceUrl: { + readOnly: true, + serializedName: "properties.workspaceUrl", type: { - name: "Object" + name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + storageAccountIdentity: { + serializedName: "properties.storageAccountIdentity", type: { - name: "String" + name: "Composite", + className: "ManagedIdentityConfiguration" } }, - uiDefinitionUri: { - serializedName: "properties.uiDefinitionUri", + encryption: { + serializedName: "properties.encryption", type: { - name: "String" + name: "Composite", + className: "WorkspacePropertiesEncryption" } }, - authorizations: { - serializedName: "properties.authorizations", + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WorkspaceProviderAuthorization" + className: "PrivateEndpointConnection" } } } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + requiredNsgRules: { + serializedName: "properties.requiredNsgRules", + type: { + name: "String" + } + }, sku: { serializedName: "sku", type: { name: "Composite", className: "Sku" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -339,6 +986,214 @@ export const Operation: msRest.CompositeMapper = { } }; +export const GroupIdInformationProperties: msRest.CompositeMapper = { + serializedName: "GroupIdInformationProperties", + type: { + name: "Composite", + className: "GroupIdInformationProperties", + modelProperties: { + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GroupIdInformation: msRest.CompositeMapper = { + serializedName: "GroupIdInformation", + type: { + name: "Composite", + className: "GroupIdInformation", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "GroupIdInformationProperties" + } + } + } + } +}; + +export const VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeeringPropertiesFormat_databricksVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const AddressSpace: msRest.CompositeMapper = { + serializedName: "AddressSpace", + type: { + name: "Composite", + className: "AddressSpace", + modelProperties: { + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeeringPropertiesFormat_remoteVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkPeering: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeering", + type: { + name: "Composite", + className: "VirtualNetworkPeering", + modelProperties: { + allowVirtualNetworkAccess: { + serializedName: "properties.allowVirtualNetworkAccess", + type: { + name: "Boolean" + } + }, + allowForwardedTraffic: { + serializedName: "properties.allowForwardedTraffic", + type: { + name: "Boolean" + } + }, + allowGatewayTransit: { + serializedName: "properties.allowGatewayTransit", + type: { + name: "Boolean" + } + }, + useRemoteGateways: { + serializedName: "properties.useRemoteGateways", + type: { + name: "Boolean" + } + }, + databricksVirtualNetwork: { + serializedName: "properties.databricksVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork" + } + }, + databricksAddressSpace: { + serializedName: "properties.databricksAddressSpace", + type: { + name: "Composite", + className: "AddressSpace" + } + }, + remoteVirtualNetwork: { + required: true, + serializedName: "properties.remoteVirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork" + } + }, + remoteAddressSpace: { + serializedName: "properties.remoteAddressSpace", + type: { + name: "Composite", + className: "AddressSpace" + } + }, + peeringState: { + readOnly: true, + serializedName: "properties.peeringState", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const WorkspaceListResult: msRest.CompositeMapper = { serializedName: "WorkspaceListResult", type: { @@ -394,3 +1249,87 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const PrivateLinkResourcesList: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesList", + type: { + name: "Composite", + className: "PrivateLinkResourcesList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupIdInformation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsList: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionsList", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkPeeringList: msRest.CompositeMapper = { + serializedName: "VirtualNetworkPeeringList", + type: { + name: "Composite", + className: "VirtualNetworkPeeringList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkPeering" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/databricks/arm-databricks/src/models/operationsMappers.ts b/sdk/databricks/arm-databricks/src/models/operationsMappers.ts index ca1587789d15..872cb56fb0bd 100644 --- a/sdk/databricks/arm-databricks/src/models/operationsMappers.ts +++ b/sdk/databricks/arm-databricks/src/models/operationsMappers.ts @@ -1,19 +1,16 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetail, + ErrorInfo, + ErrorResponse, Operation, OperationDisplay, - ErrorResponse, - ErrorInfo, - ErrorDetail + OperationListResult } from "../models/mappers"; - diff --git a/sdk/databricks/arm-databricks/src/models/parameters.ts b/sdk/databricks/arm-databricks/src/models/parameters.ts index 0ebe5bdcaaa5..098101132b68 100644 --- a/sdk/databricks/arm-databricks/src/models/parameters.ts +++ b/sdk/databricks/arm-databricks/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,11 +19,35 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2021-04-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-04-01', + type: { + name: "String" + } + } +}; +export const groupId: msRest.OperationURLParameter = { + parameterPath: "groupId", + mapper: { + required: true, + serializedName: "groupId", type: { name: "String" } @@ -41,6 +64,26 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const peeringName: msRest.OperationURLParameter = { + parameterPath: "peeringName", + mapper: { + required: true, + serializedName: "peeringName", + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts b/sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..7fb8e87c2230 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressSpace, + BaseResource, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, + ErrorDetail, + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpointConnectionsList, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts b/sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..1bc4c5b4b2c7 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressSpace, + BaseResource, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, + ErrorDetail, + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResourcesList, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts b/sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts new file mode 100644 index 000000000000..86dc085e6743 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/vNetPeeringMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressSpace, + BaseResource, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, + ErrorDetail, + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringList, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts b/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts index e6f592d4a993..d1896d68580b 100644 --- a/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts +++ b/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts @@ -1,24 +1,44 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - Workspace, - TrackedResource, - Resource, + AddressSpace, BaseResource, - WorkspaceProviderAuthorization, - Sku, - ErrorResponse, - ErrorInfo, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, ErrorDetail, - WorkspaceUpdate, - WorkspaceListResult + ErrorInfo, + ErrorResponse, + GroupIdInformation, + GroupIdInformationProperties, + ManagedIdentityConfiguration, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + TrackedResource, + VirtualNetworkPeering, + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, + Workspace, + WorkspaceCustomBooleanParameter, + WorkspaceCustomObjectParameter, + WorkspaceCustomParameters, + WorkspaceCustomStringParameter, + WorkspaceEncryptionParameter, + WorkspaceListResult, + WorkspacePropertiesEncryption, + WorkspaceProviderAuthorization, + WorkspaceUpdate } from "../models/mappers"; - diff --git a/sdk/databricks/arm-databricks/src/operations/index.ts b/sdk/databricks/arm-databricks/src/operations/index.ts index 74640cd56b69..06215340107a 100644 --- a/sdk/databricks/arm-databricks/src/operations/index.ts +++ b/sdk/databricks/arm-databricks/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,3 +9,6 @@ export * from "./workspaces"; export * from "./operations"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; +export * from "./vNetPeering"; diff --git a/sdk/databricks/arm-databricks/src/operations/operations.ts b/sdk/databricks/arm-databricks/src/operations/operations.ts index 69151b9b3e14..ee8855264031 100644 --- a/sdk/databricks/arm-databricks/src/operations/operations.ts +++ b/sdk/databricks/arm-databricks/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { DatabricksClientContext } from "../databricksClientContext"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: DatabricksClientContext; + private readonly client: AzureDatabricksManagementClientContext; /** * Create a Operations. - * @param {DatabricksClientContext} client Reference to the service client. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. */ - constructor(client: DatabricksClientContext) { + constructor(client: AzureDatabricksManagementClientContext) { this.client = client; } @@ -85,7 +84,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Databricks/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts b/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..157402cae6aa --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts @@ -0,0 +1,339 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * List private endpoint connections of the workspace + * @summary List private endpoint connections + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get a private endpoint connection properties for a workspace + * @summary Get private endpoint connection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the status of a private endpoint connection with the specified name + * @summary Update private endpoint connection status + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection The private endpoint connection with updated properties + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,workspaceName,privateEndpointConnectionName,privateEndpointConnection,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Remove private endpoint connection with the specified name + * @summary Remove private endpoint connection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Update the status of a private endpoint connection with the specified name + * @summary Update private endpoint connection status + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection The private endpoint connection with updated properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + privateEndpointConnection, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Remove private endpoint connection with the specified name + * @summary Remove private endpoint connection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List private endpoint connections of the workspace + * @summary List private endpoint connections + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateEndpointConnection", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts b/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..70ff1d3234d8 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts @@ -0,0 +1,203 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * List private link resources for a given workspace + * @summary List private link resources + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the specified private link resource for the given group id (sub-resource) + * @summary Get the specified private link resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + groupId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List private link resources for a given workspace + * @summary List private link resources + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GroupIdInformation + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts b/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts new file mode 100644 index 000000000000..7d36413fb6be --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts @@ -0,0 +1,333 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/vNetPeeringMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a VNetPeering. */ +export class VNetPeering { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a VNetPeering. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * Gets the workspace vNet Peering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, peeringName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, peeringName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + peeringName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the workspace vNetPeering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,peeringName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates vNet Peering for workspace. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(virtualNetworkPeeringParameters,resourceGroupName,workspaceName,peeringName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the workspace vNet Peerings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Deletes the workspace vNetPeering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + peeringName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Creates vNet Peering for workspace. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param peeringName The name of the workspace vNet peering. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(virtualNetworkPeeringParameters: Models.VirtualNetworkPeering, resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + virtualNetworkPeeringParameters, + resourceGroupName, + workspaceName, + peeringName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the workspace vNet Peerings. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByWorkspaceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.peeringName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeering + }, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeeringList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.peeringName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId, + Parameters.peeringName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "virtualNetworkPeeringParameters", + mapper: { + ...Mappers.VirtualNetworkPeering, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeering + }, + 201: { + bodyMapper: Mappers.VirtualNetworkPeering + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkPeeringList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/workspaces.ts b/sdk/databricks/arm-databricks/src/operations/workspaces.ts index df498c59fb03..57faea6c5ebc 100644 --- a/sdk/databricks/arm-databricks/src/operations/workspaces.ts +++ b/sdk/databricks/arm-databricks/src/operations/workspaces.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/workspacesMappers"; import * as Parameters from "../models/parameters"; -import { DatabricksClientContext } from "../databricksClientContext"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; /** Class representing a Workspaces. */ export class Workspaces { - private readonly client: DatabricksClientContext; + private readonly client: AzureDatabricksManagementClientContext; /** * Create a Workspaces. - * @param {DatabricksClientContext} client Reference to the service client. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. */ - constructor(client: DatabricksClientContext) { + constructor(client: AzureDatabricksManagementClientContext) { this.client = client; } @@ -275,7 +274,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -284,7 +283,6 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Workspace }, - 404: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -300,7 +298,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -323,7 +321,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -348,12 +346,13 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, 204: {}, default: { @@ -372,7 +371,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -407,7 +406,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -438,6 +437,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -459,6 +461,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/databricks/arm-databricks/tsconfig.json b/sdk/databricks/arm-databricks/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/databricks/arm-databricks/tsconfig.json +++ b/sdk/databricks/arm-databricks/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true