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..f244c0785730 100644 --- a/sdk/databricks/arm-databricks/README.md +++ b/sdk/databricks/arm-databricks/README.md @@ -9,27 +9,27 @@ This package contains an isomorphic SDK for DatabricksClient. ### How to Install -``` +```bash npm install @azure/arm-databricks ``` ### How to use -#### nodejs - Authentication, client creation and get workspaces as an example written in TypeScript. +#### nodejs - client creation and get workspaces as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### 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"; +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package +```typescript +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { DatabricksClient } = require("@azure/arm-databricks"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { @@ -49,7 +49,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -99,5 +99,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 bbb647556acb..c78d8f8079c5 100644 --- a/sdk/databricks/arm-databricks/package.json +++ b/sdk/databricks/arm-databricks/package.json @@ -4,9 +4,9 @@ "description": "DatabricksClient 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.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/databricksClient.js", "types": "./esm/databricksClient.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.5.3", + "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/master/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 +44,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..8067451a8680 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/databricksClient.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/databricksClient.ts b/sdk/databricks/arm-databricks/src/databricksClient.ts index ef1cc667e629..f9cb76414aaf 100644 --- a/sdk/databricks/arm-databricks/src/databricksClient.ts +++ b/sdk/databricks/arm-databricks/src/databricksClient.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 diff --git a/sdk/databricks/arm-databricks/src/databricksClientContext.ts b/sdk/databricks/arm-databricks/src/databricksClientContext.ts index be3305b83c0f..fb8dab7dd75e 100644 --- a/sdk/databricks/arm-databricks/src/databricksClientContext.ts +++ b/sdk/databricks/arm-databricks/src/databricksClientContext.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,7 +12,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-databricks"; -const packageVersion = "0.1.0"; +const packageVersion = "1.1.0"; export class DatabricksClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +43,7 @@ export class DatabricksClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-04-01'; + this.apiVersion = '2021-04-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/databricks/arm-databricks/src/models/index.ts b/sdk/databricks/arm-databricks/src/models/index.ts index 5b622f068da9..ea9a21e39871 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,294 +11,564 @@ 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; +} + +/** * 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; + /** + * 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; } /** - * @interface - * An interface representing WorkspaceUpdate. * An update to a workspace. - * */ export interface WorkspaceUpdate { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * Resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @interface * An interface representing ErrorDetail. * @summary Error details. - * */ export interface ErrorDetail { /** - * @member {string} code The error's code. + * The error's code. */ code: string; /** - * @member {string} message A human readable error message. + * A human readable error message. */ message: string; /** - * @member {string} [target] Indicates which property in the request is - * responsible for the error. + * Indicates which property in the request is responsible for the error. */ target?: string; } /** - * @interface * An interface representing ErrorInfo. * @summary The code and message for an error. - * */ export interface ErrorInfo { /** - * @member {string} code A machine readable error code. + * A machine readable error code. */ code: string; /** - * @member {string} message A human readable error message. + * A human readable error message. */ message: string; /** - * @member {ErrorDetail[]} [details] error details. + * error details. */ details?: ErrorDetail[]; /** - * @member {string} [innererror] Inner error details if they exist. + * Inner error details if they exist. */ innererror?: string; } /** - * @interface - * An interface representing ErrorResponse. - * @summary Error response. - * * Contains details when the response code indicates an error. - * + * @summary Error response. */ export interface ErrorResponse { /** - * @member {ErrorInfo} error The error details. + * The error details. */ error: ErrorInfo; } /** - * @interface - * An interface representing OperationDisplay. * The object that represents the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft.ResourceProvider + * Service provider: Microsoft.ResourceProvider */ provider?: string; /** - * @member {string} [resource] Resource on which the operation is performed. + * Resource on which the operation is performed. */ resource?: string; /** - * @member {string} [operation] Operation type: Read, write, delete, etc. + * Operation type: Read, write, delete, etc. */ operation?: string; } /** - * @interface - * An interface representing Operation. * REST API operation - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * Operation name: {provider}/{resource}/{operation} */ name?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The object that represents the operation. */ display?: OperationDisplay; } /** - * @interface * An interface representing DatabricksClientOptions. - * @extends AzureServiceClientOptions */ export interface DatabricksClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the WorkspaceListResult. * List of workspaces. - * * @extends Array */ export interface WorkspaceListResult extends Array { /** - * @member {string} [nextLink] The URL to use for getting the next set of - * results. + * The URL to use for getting the next set of results. */ nextLink?: string; } /** * @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. - * + * 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 { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. + * URL to get the next set of operation 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', @@ -310,6 +578,22 @@ export interface OperationListResult extends Array { */ export type ProvisioningState = 'Accepted' | 'Running' | 'Ready' | 'Creating' | 'Created' | 'Deleting' | 'Deleted' | 'Canceled' | 'Failed' | 'Succeeded' | 'Updating'; +/** + * 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'; + /** * Contains response data for the get operation. */ @@ -322,6 +606,7 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -341,6 +626,7 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -360,6 +646,7 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -379,6 +666,7 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -398,6 +686,7 @@ export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -417,6 +706,7 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -436,6 +726,7 @@ export type WorkspacesBeginUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -455,6 +746,7 @@ export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -474,6 +766,7 @@ export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -493,6 +786,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -512,6 +806,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/databricks/arm-databricks/src/models/mappers.ts b/sdk/databricks/arm-databricks/src/models/mappers.ts index 8d5caa24faef..36ced8749338 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,161 @@ 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 Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -61,6 +464,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: { @@ -138,7 +587,8 @@ export const Workspace: msRest.CompositeMapper = { parameters: { serializedName: "properties.parameters", type: { - name: "Object" + name: "Composite", + className: "WorkspaceCustomParameters" } }, provisioningState: { @@ -166,12 +616,68 @@ export const Workspace: msRest.CompositeMapper = { } } }, + 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: "String" + } + }, + storageAccountIdentity: { + serializedName: "properties.storageAccountIdentity", + type: { + name: "Composite", + className: "ManagedIdentityConfiguration" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "WorkspacePropertiesEncryption" + } + }, sku: { serializedName: "sku", type: { name: "Composite", className: "Sku" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } 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..2653070f0ee1 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 diff --git a/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts b/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts index e6f592d4a993..29eb266b55a8 100644 --- a/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts +++ b/sdk/databricks/arm-databricks/src/models/workspacesMappers.ts @@ -1,24 +1,34 @@ /* - * 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, BaseResource, - WorkspaceProviderAuthorization, - Sku, - ErrorResponse, - ErrorInfo, + CreatedBy, + Encryption, + EncryptionEntitiesDefinition, + EncryptionV2, + EncryptionV2KeyVaultProperties, ErrorDetail, - WorkspaceUpdate, - WorkspaceListResult + ErrorInfo, + ErrorResponse, + ManagedIdentityConfiguration, + Resource, + Sku, + SystemData, + TrackedResource, + 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..89f186a34d61 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 diff --git a/sdk/databricks/arm-databricks/src/operations/operations.ts b/sdk/databricks/arm-databricks/src/operations/operations.ts index 69151b9b3e14..535bd6fa4f43 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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/databricks/arm-databricks/src/operations/workspaces.ts b/sdk/databricks/arm-databricks/src/operations/workspaces.ts index df498c59fb03..fae29064bbd6 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 @@ -284,7 +283,6 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Workspace }, - 404: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -354,6 +352,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, 204: {}, default: { @@ -438,6 +437,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -459,6 +461,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], 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