diff --git a/sdk/databricks/arm-databricks/CHANGELOG.md b/sdk/databricks/arm-databricks/CHANGELOG.md index 25c9cf1cf219..4da3193527a1 100644 --- a/sdk/databricks/arm-databricks/CHANGELOG.md +++ b/sdk/databricks/arm-databricks/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 3.0.0-beta.4 (2022-07-11) -## 3.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 3.0.0-beta.3 (2022-04-15) - -The package of @azure/arm-databricks is using our next generation design principles since version 3.0.0-beta.3, which contains breaking changes. +The package of @azure/arm-databricks is using our next generation design principles since version 3.0.0-beta.4, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/databricks/arm-databricks/_meta.json b/sdk/databricks/arm-databricks/_meta.json index ae4d23091702..73e59d431e87 100644 --- a/sdk/databricks/arm-databricks/_meta.json +++ b/sdk/databricks/arm-databricks/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7086ee861c3a6196bb98f8b327af11d03e545a05", - "readme": "specification\\databricks\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\databricks\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "90778b008a2aac445555ef1893b79e453f876152", + "readme": "specification/databricks/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/databricks/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/databricks/arm-databricks/package.json b/sdk/databricks/arm-databricks/package.json index 7a31d46b2b09..3e25ec47dace 100644 --- a/sdk/databricks/arm-databricks/package.json +++ b/sdk/databricks/arm-databricks/package.json @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databricks/arm-databricks", "repository": { @@ -93,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databricks?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/databricks/arm-databricks/review/arm-databricks.api.md b/sdk/databricks/arm-databricks/review/arm-databricks.api.md index fb066ad491ce..be5d31868060 100644 --- a/sdk/databricks/arm-databricks/review/arm-databricks.api.md +++ b/sdk/databricks/arm-databricks/review/arm-databricks.api.md @@ -10,6 +10,103 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export type AccessConnector = TrackedResource & { + identity?: IdentityData; + properties?: AccessConnectorProperties; +}; + +// @public +export interface AccessConnectorListResult { + nextLink?: string; + value?: AccessConnector[]; +} + +// @public (undocumented) +export interface AccessConnectorProperties { + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AccessConnectors { + beginCreateOrUpdate(resourceGroupName: string, connectorName: string, parameters: AccessConnector, options?: AccessConnectorsCreateOrUpdateOptionalParams): Promise, AccessConnectorsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, connectorName: string, parameters: AccessConnector, options?: AccessConnectorsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, connectorName: string, options?: AccessConnectorsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, connectorName: string, options?: AccessConnectorsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, connectorName: string, parameters: AccessConnectorUpdate, options?: AccessConnectorsUpdateOptionalParams): Promise, AccessConnectorsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, connectorName: string, parameters: AccessConnectorUpdate, options?: AccessConnectorsUpdateOptionalParams): Promise; + get(resourceGroupName: string, connectorName: string, options?: AccessConnectorsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AccessConnectorsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AccessConnectorsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AccessConnectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccessConnectorsCreateOrUpdateResponse = AccessConnector; + +// @public +export interface AccessConnectorsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AccessConnectorsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessConnectorsGetResponse = AccessConnector; + +// @public +export interface AccessConnectorsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessConnectorsListByResourceGroupNextResponse = AccessConnectorListResult; + +// @public +export interface AccessConnectorsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessConnectorsListByResourceGroupResponse = AccessConnectorListResult; + +// @public +export interface AccessConnectorsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessConnectorsListBySubscriptionNextResponse = AccessConnectorListResult; + +// @public +export interface AccessConnectorsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessConnectorsListBySubscriptionResponse = AccessConnectorListResult; + +// @public +export interface AccessConnectorsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AccessConnectorsUpdateResponse = AccessConnector; + +// @public +export interface AccessConnectorUpdate { + identity?: IdentityData; + tags?: { + [propertyName: string]: string; + }; +} + // @public export interface AddressSpace { addressPrefixes?: string[]; @@ -21,6 +118,8 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureDatabricksManagementClientOptionalParams); // (undocumented) + accessConnectors: AccessConnectors; + // (undocumented) apiVersion: string; // (undocumented) operations: Operations; @@ -133,6 +232,16 @@ export interface GroupIdInformationProperties { requiredZoneNames?: string[]; } +// @public +export interface IdentityData { + readonly principalId?: string; + readonly tenantId?: string; + type: IdentityType; +} + +// @public +export type IdentityType = string; + // @public export type KeySource = string; @@ -164,6 +273,14 @@ export enum KnownEncryptionKeySource { MicrosoftKeyvault = "Microsoft.Keyvault" } +// @public +export enum KnownIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned" +} + // @public export enum KnownKeySource { // (undocumented) diff --git a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts index 004d75d3b20a..931fbe2436a1 100644 --- a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { WorkspacesImpl, @@ -15,7 +20,8 @@ import { PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, OutboundNetworkDependenciesEndpointsImpl, - VNetPeeringImpl + VNetPeeringImpl, + AccessConnectorsImpl } from "./operations"; import { Workspaces, @@ -23,7 +29,8 @@ import { PrivateLinkResources, PrivateEndpointConnections, OutboundNetworkDependenciesEndpoints, - VNetPeering + VNetPeering, + AccessConnectors } from "./operationsInterfaces"; import { AzureDatabricksManagementClientOptionalParams } from "./models"; @@ -106,7 +113,7 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-04-01-preview"; + this.apiVersion = options.apiVersion || "2022-04-01-preview"; this.workspaces = new WorkspacesImpl(this); this.operations = new OperationsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); @@ -115,6 +122,36 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient { this ); this.vNetPeering = new VNetPeeringImpl(this); + this.accessConnectors = new AccessConnectorsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } workspaces: Workspaces; @@ -123,4 +160,5 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient { privateEndpointConnections: PrivateEndpointConnections; outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; vNetPeering: VNetPeering; + accessConnectors: AccessConnectors; } diff --git a/sdk/databricks/arm-databricks/src/models/index.ts b/sdk/databricks/arm-databricks/src/models/index.ts index 0278a129725c..cb28ee2af01f 100644 --- a/sdk/databricks/arm-databricks/src/models/index.ts +++ b/sdk/databricks/arm-databricks/src/models/index.ts @@ -468,6 +468,46 @@ export interface VirtualNetworkPeeringList { nextLink?: string; } +/** Identity for the resource. */ +export interface IdentityData { + /** + * The principal ID of resource identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The identity type. */ + type: IdentityType; +} + +export interface AccessConnectorProperties { + /** + * Provisioning status of the accessConnector. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** An update to an azure databricks accessConnector. */ +export interface AccessConnectorUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The identity of the resource. */ + identity?: IdentityData; +} + +/** List of azure databricks accessConnector. */ +export interface AccessConnectorListResult { + /** The array of azure databricks accessConnector. */ + value?: AccessConnector[]; + /** The URL to use for getting the next set of results. */ + nextLink?: string; +} + /** The resource model definition for a ARM tracked top level resource */ export type TrackedResource = Resource & { /** Resource tags. */ @@ -538,6 +578,14 @@ export type Workspace = TrackedResource & { requiredNsgRules?: RequiredNsgRules; }; +/** Information about azure databricks accessConnector. */ +export type AccessConnector = TrackedResource & { + /** Identity for the resource. */ + identity?: IdentityData; + /** Azure Databricks accessConnector properties */ + properties?: AccessConnectorProperties; +}; + /** Known values of {@link CustomParameterType} that the service accepts. */ export enum KnownCustomParameterType { Bool = "Bool", @@ -754,6 +802,22 @@ export enum KnownPeeringProvisioningState { */ export type PeeringProvisioningState = string; +/** Known values of {@link IdentityType} that the service accepts. */ +export enum KnownIdentityType { + None = "None", + SystemAssigned = "SystemAssigned" +} + +/** + * Defines values for IdentityType. \ + * {@link KnownIdentityType} can be used interchangeably with IdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** + */ +export type IdentityType = string; + /** Optional parameters. */ export interface WorkspacesGetOptionalParams extends coreClient.OperationOptions {} @@ -948,6 +1012,74 @@ export interface VNetPeeringListByWorkspaceNextOptionalParams /** Contains response data for the listByWorkspaceNext operation. */ export type VNetPeeringListByWorkspaceNextResponse = VirtualNetworkPeeringList; +/** Optional parameters. */ +export interface AccessConnectorsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccessConnectorsGetResponse = AccessConnector; + +/** Optional parameters. */ +export interface AccessConnectorsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface AccessConnectorsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type AccessConnectorsCreateOrUpdateResponse = AccessConnector; + +/** Optional parameters. */ +export interface AccessConnectorsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type AccessConnectorsUpdateResponse = AccessConnector; + +/** Optional parameters. */ +export interface AccessConnectorsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type AccessConnectorsListByResourceGroupResponse = AccessConnectorListResult; + +/** Optional parameters. */ +export interface AccessConnectorsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type AccessConnectorsListBySubscriptionResponse = AccessConnectorListResult; + +/** Optional parameters. */ +export interface AccessConnectorsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type AccessConnectorsListByResourceGroupNextResponse = AccessConnectorListResult; + +/** Optional parameters. */ +export interface AccessConnectorsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type AccessConnectorsListBySubscriptionNextResponse = AccessConnectorListResult; + /** Optional parameters. */ export interface AzureDatabricksManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/databricks/arm-databricks/src/models/mappers.ts b/sdk/databricks/arm-databricks/src/models/mappers.ts index 186be95c018b..045e9a23ebae 100644 --- a/sdk/databricks/arm-databricks/src/models/mappers.ts +++ b/sdk/databricks/arm-databricks/src/models/mappers.ts @@ -1189,6 +1189,102 @@ export const VirtualNetworkPeeringList: coreClient.CompositeMapper = { } }; +export const IdentityData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentityData", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const AccessConnectorProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessConnectorProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AccessConnectorUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessConnectorUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityData" + } + } + } + } +}; + +export const AccessConnectorListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessConnectorListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessConnector" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1366,3 +1462,27 @@ export const Workspace: coreClient.CompositeMapper = { } } }; + +export const AccessConnector: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessConnector", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityData" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AccessConnectorProperties" + } + } + } + } +}; diff --git a/sdk/databricks/arm-databricks/src/models/parameters.ts b/sdk/databricks/arm-databricks/src/models/parameters.ts index 9e56f666683b..1acbaea2ea81 100644 --- a/sdk/databricks/arm-databricks/src/models/parameters.ts +++ b/sdk/databricks/arm-databricks/src/models/parameters.ts @@ -15,7 +15,9 @@ import { Workspace as WorkspaceMapper, WorkspaceUpdate as WorkspaceUpdateMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, - VirtualNetworkPeering as VirtualNetworkPeeringMapper + VirtualNetworkPeering as VirtualNetworkPeeringMapper, + AccessConnector as AccessConnectorMapper, + AccessConnectorUpdate as AccessConnectorUpdateMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -76,7 +78,7 @@ export const workspaceName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-04-01-preview", + defaultValue: "2022-04-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -172,3 +174,28 @@ export const virtualNetworkPeeringParameters: OperationParameter = { parameterPath: "virtualNetworkPeeringParameters", mapper: VirtualNetworkPeeringMapper }; + +export const connectorName: OperationURLParameter = { + parameterPath: "connectorName", + mapper: { + constraints: { + MaxLength: 64, + MinLength: 3 + }, + serializedName: "connectorName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: AccessConnectorMapper +}; + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: AccessConnectorUpdateMapper +}; diff --git a/sdk/databricks/arm-databricks/src/operations/accessConnectors.ts b/sdk/databricks/arm-databricks/src/operations/accessConnectors.ts new file mode 100644 index 000000000000..ed1f66680f5b --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/accessConnectors.ts @@ -0,0 +1,680 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AccessConnectors } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClient } from "../azureDatabricksManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + AccessConnector, + AccessConnectorsListByResourceGroupNextOptionalParams, + AccessConnectorsListByResourceGroupOptionalParams, + AccessConnectorsListBySubscriptionNextOptionalParams, + AccessConnectorsListBySubscriptionOptionalParams, + AccessConnectorsGetOptionalParams, + AccessConnectorsGetResponse, + AccessConnectorsDeleteOptionalParams, + AccessConnectorsCreateOrUpdateOptionalParams, + AccessConnectorsCreateOrUpdateResponse, + AccessConnectorUpdate, + AccessConnectorsUpdateOptionalParams, + AccessConnectorsUpdateResponse, + AccessConnectorsListByResourceGroupResponse, + AccessConnectorsListBySubscriptionResponse, + AccessConnectorsListByResourceGroupNextResponse, + AccessConnectorsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing AccessConnectors operations. */ +export class AccessConnectorsImpl implements AccessConnectors { + private readonly client: AzureDatabricksManagementClient; + + /** + * Initialize a new instance of the class AccessConnectors class. + * @param client Reference to the service client + */ + constructor(client: AzureDatabricksManagementClient) { + this.client = client; + } + + /** + * Gets all the azure databricks accessConnectors within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AccessConnectorsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AccessConnectorsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AccessConnectorsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets all the azure databricks accessConnectors within a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: AccessConnectorsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AccessConnectorsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: AccessConnectorsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets an azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectorName: string, + options?: AccessConnectorsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectorName, options }, + getOperationSpec + ); + } + + /** + * Deletes the azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + connectorName: string, + options?: AccessConnectorsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, connectorName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectorName: string, + options?: AccessConnectorsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + connectorName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Creates or updates azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnector, + options?: AccessConnectorsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccessConnectorsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, connectorName, parameters, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnector, + options?: AccessConnectorsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + connectorName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates an azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters The update to the azure databricks accessConnector. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnectorUpdate, + options?: AccessConnectorsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccessConnectorsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, connectorName, parameters, options }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates an azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters The update to the azure databricks accessConnector. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnectorUpdate, + options?: AccessConnectorsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + connectorName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets all the azure databricks accessConnectors within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AccessConnectorsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Gets all the azure databricks accessConnectors within a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: AccessConnectorsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: AccessConnectorsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: AccessConnectorsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessConnector + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.connectorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.connectorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AccessConnector + }, + 201: { + bodyMapper: Mappers.AccessConnector + }, + 202: { + bodyMapper: Mappers.AccessConnector + }, + 204: { + bodyMapper: Mappers.AccessConnector + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.connectorName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AccessConnector + }, + 201: { + bodyMapper: Mappers.AccessConnector + }, + 202: { + bodyMapper: Mappers.AccessConnector + }, + 204: { + bodyMapper: Mappers.AccessConnector + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.connectorName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessConnectorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Databricks/accessConnectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessConnectorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessConnectorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessConnectorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/index.ts b/sdk/databricks/arm-databricks/src/operations/index.ts index db44b556610d..e39d4223a898 100644 --- a/sdk/databricks/arm-databricks/src/operations/index.ts +++ b/sdk/databricks/arm-databricks/src/operations/index.ts @@ -12,3 +12,4 @@ export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; export * from "./outboundNetworkDependenciesEndpoints"; export * from "./vNetPeering"; +export * from "./accessConnectors"; diff --git a/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts b/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts index 3a67adec5252..faf8632b51a7 100644 --- a/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts +++ b/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts @@ -32,7 +32,7 @@ export class OutboundNetworkDependenciesEndpointsImpl /** * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. You * must configure outbound access with these endpoints. For more information, see - * https://docs.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/udr + * https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param options The options parameters. diff --git a/sdk/databricks/arm-databricks/src/operationsInterfaces/accessConnectors.ts b/sdk/databricks/arm-databricks/src/operationsInterfaces/accessConnectors.ts new file mode 100644 index 000000000000..06c1f2ad8e3b --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operationsInterfaces/accessConnectors.ts @@ -0,0 +1,139 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + AccessConnector, + AccessConnectorsListByResourceGroupOptionalParams, + AccessConnectorsListBySubscriptionOptionalParams, + AccessConnectorsGetOptionalParams, + AccessConnectorsGetResponse, + AccessConnectorsDeleteOptionalParams, + AccessConnectorsCreateOrUpdateOptionalParams, + AccessConnectorsCreateOrUpdateResponse, + AccessConnectorUpdate, + AccessConnectorsUpdateOptionalParams, + AccessConnectorsUpdateResponse +} from "../models"; + +/// +/** Interface representing a AccessConnectors. */ +export interface AccessConnectors { + /** + * Gets all the azure databricks accessConnectors within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AccessConnectorsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets all the azure databricks accessConnectors within a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: AccessConnectorsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectorName: string, + options?: AccessConnectorsGetOptionalParams + ): Promise; + /** + * Deletes the azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + connectorName: string, + options?: AccessConnectorsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + connectorName: string, + options?: AccessConnectorsDeleteOptionalParams + ): Promise; + /** + * Creates or updates azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnector, + options?: AccessConnectorsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccessConnectorsCreateOrUpdateResponse + > + >; + /** + * Creates or updates azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnector, + options?: AccessConnectorsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters The update to the azure databricks accessConnector. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnectorUpdate, + options?: AccessConnectorsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AccessConnectorsUpdateResponse + > + >; + /** + * Updates an azure databricks accessConnector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectorName The name of the azure databricks accessConnector. + * @param parameters The update to the azure databricks accessConnector. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + connectorName: string, + parameters: AccessConnectorUpdate, + options?: AccessConnectorsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/databricks/arm-databricks/src/operationsInterfaces/index.ts b/sdk/databricks/arm-databricks/src/operationsInterfaces/index.ts index db44b556610d..e39d4223a898 100644 --- a/sdk/databricks/arm-databricks/src/operationsInterfaces/index.ts +++ b/sdk/databricks/arm-databricks/src/operationsInterfaces/index.ts @@ -12,3 +12,4 @@ export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; export * from "./outboundNetworkDependenciesEndpoints"; export * from "./vNetPeering"; +export * from "./accessConnectors"; diff --git a/sdk/databricks/arm-databricks/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts b/sdk/databricks/arm-databricks/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts index feb11cc09dd1..32959f9fb472 100644 --- a/sdk/databricks/arm-databricks/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +++ b/sdk/databricks/arm-databricks/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts @@ -16,7 +16,7 @@ export interface OutboundNetworkDependenciesEndpoints { /** * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. You * must configure outbound access with these endpoints. For more information, see - * https://docs.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/udr + * https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param options The options parameters. diff --git a/sdk/databricks/arm-databricks/test/sampleTest.ts b/sdk/databricks/arm-databricks/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/databricks/arm-databricks/test/sampleTest.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. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/databricks/arm-databricks/tsconfig.json b/sdk/databricks/arm-databricks/tsconfig.json index 5fd6e776dd67..3e6ae96443f3 100644 --- a/sdk/databricks/arm-databricks/tsconfig.json +++ b/sdk/databricks/arm-databricks/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-databricks": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"