diff --git a/sdk/databricks/arm-databricks/package.json b/sdk/databricks/arm-databricks/package.json index 050a2526cc69..2cfee707588c 100644 --- a/sdk/databricks/arm-databricks/package.json +++ b/sdk/databricks/arm-databricks/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/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" diff --git a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts index 5d55e69868a9..330161bf33b9 100644 --- a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClient.ts @@ -21,6 +21,7 @@ class AzureDatabricksManagementClient extends AzureDatabricksManagementClientCon operations: operations.Operations; privateLinkResources: operations.PrivateLinkResources; privateEndpointConnections: operations.PrivateEndpointConnections; + outboundNetworkDependenciesEndpoints: operations.OutboundNetworkDependenciesEndpoints; vNetPeering: operations.VNetPeering; /** @@ -40,6 +41,7 @@ class AzureDatabricksManagementClient extends AzureDatabricksManagementClientCon this.operations = new operations.Operations(this); this.privateLinkResources = new operations.PrivateLinkResources(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.outboundNetworkDependenciesEndpoints = new operations.OutboundNetworkDependenciesEndpoints(this); this.vNetPeering = new operations.VNetPeering(this); } } diff --git a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts index 56998e973ae1..364ac16e92c9 100644 --- a/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts +++ b/sdk/databricks/arm-databricks/src/azureDatabricksManagementClientContext.ts @@ -18,6 +18,7 @@ const packageVersion = "2.0.0"; export class AzureDatabricksManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; + apiVersion?: string; /** * Initializes a new instance of the AzureDatabricksManagementClient class. @@ -48,6 +49,7 @@ export class AzureDatabricksManagementClientContext extends msRestAzure.AzureSer super(credentials, options); + 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 356dc9ebbf76..8e94ca1091bb 100644 --- a/sdk/databricks/arm-databricks/src/models/index.ts +++ b/sdk/databricks/arm-databricks/src/models/index.ts @@ -640,6 +640,58 @@ export interface GroupIdInformation extends Resource { properties: GroupIdInformationProperties; } +/** + * Connect information from the Workspace to a single endpoint. + */ +export interface EndpointDetail { + /** + * An IP Address that Domain Name currently resolves to. + */ + ipAddress?: string; + /** + * The port an endpoint is connected to. + */ + port?: number; + /** + * The time in milliseconds it takes for the connection to be created from the Workspace to this + * IpAddress at this Port. + */ + latency?: number; + /** + * Whether it is possible to create a connection from the Workspace to this IpAddress at this + * Port. + */ + isAccessible?: boolean; +} + +/** + * A domain name or IP address the Workspace is reaching at. + */ +export interface EndpointDependency { + /** + * The domain name of the dependency. + */ + domainName?: string; + /** + * The Ports used when connecting to domainName. + */ + endpointDetails?: EndpointDetail[]; +} + +/** + * Egress endpoints which Workspace connects to for common purposes. + */ +export interface OutboundEnvironmentEndpoint { + /** + * The category of endpoints accessed by the Workspace, e.g. azure-storage, azure-mysql, etc. + */ + category?: string; + /** + * The endpoints that Workspace connect to + */ + endpoints?: EndpointDependency[]; +} + /** * The remote virtual network should be in the same region. See here to learn more * (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). @@ -801,6 +853,19 @@ export interface PrivateEndpointConnectionsList extends Array + */ +export interface OutboundEnvironmentEndpointCollection extends Array { + /** + * Link to next page of resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * @interface * Gets all virtual network peerings under a workspace. @@ -1274,6 +1339,26 @@ export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnecti }; }; +/** + * Contains response data for the list operation. + */ +export type OutboundNetworkDependenciesEndpointsListResponse = OutboundEnvironmentEndpointCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OutboundEnvironmentEndpointCollection; + }; +}; + /** * Contains response data for the get operation. */ diff --git a/sdk/databricks/arm-databricks/src/models/mappers.ts b/sdk/databricks/arm-databricks/src/models/mappers.ts index ccaf8f4e0995..4dbe913b2b0e 100644 --- a/sdk/databricks/arm-databricks/src/models/mappers.ts +++ b/sdk/databricks/arm-databricks/src/models/mappers.ts @@ -1043,6 +1043,96 @@ export const GroupIdInformation: msRest.CompositeMapper = { } }; +export const EndpointDetail: msRest.CompositeMapper = { + serializedName: "EndpointDetail", + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + latency: { + serializedName: "latency", + type: { + name: "Number" + } + }, + isAccessible: { + serializedName: "isAccessible", + type: { + name: "Boolean" + } + } + } + } +}; + +export const EndpointDependency: msRest.CompositeMapper = { + serializedName: "EndpointDependency", + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } + } + } + } +}; + +export const OutboundEnvironmentEndpoint: msRest.CompositeMapper = { + serializedName: "OutboundEnvironmentEndpoint", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } + } + } + } +}; + export const VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork: msRest.CompositeMapper = { serializedName: "VirtualNetworkPeeringPropertiesFormat_databricksVirtualNetwork", type: { @@ -1306,6 +1396,28 @@ export const PrivateEndpointConnectionsList: msRest.CompositeMapper = { } }; +export const OutboundEnvironmentEndpointCollection: msRest.CompositeMapper = { + serializedName: "OutboundEnvironmentEndpointCollection", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + } + } + } +}; + export const VirtualNetworkPeeringList: msRest.CompositeMapper = { serializedName: "VirtualNetworkPeeringList", type: { diff --git a/sdk/databricks/arm-databricks/src/models/outboundNetworkDependenciesEndpointsMappers.ts b/sdk/databricks/arm-databricks/src/models/outboundNetworkDependenciesEndpointsMappers.ts new file mode 100644 index 000000000000..fdbdaad353e8 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/models/outboundNetworkDependenciesEndpointsMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + EndpointDependency, + EndpointDetail, + ErrorDetail, + ErrorInfo, + ErrorResponse, + OutboundEnvironmentEndpoint, + OutboundEnvironmentEndpointCollection +} from "../models/mappers"; diff --git a/sdk/databricks/arm-databricks/src/models/parameters.ts b/sdk/databricks/arm-databricks/src/models/parameters.ts index 098101132b68..b53e88050158 100644 --- a/sdk/databricks/arm-databricks/src/models/parameters.ts +++ b/sdk/databricks/arm-databricks/src/models/parameters.ts @@ -19,25 +19,11 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion0: msRest.OperationQueryParameter = { +export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, - isConstant: true, serializedName: "api-version", - defaultValue: '2021-04-01-preview', - type: { - name: "String" - } - } -}; -export const apiVersion1: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2018-04-01', type: { name: "String" } diff --git a/sdk/databricks/arm-databricks/src/operations/index.ts b/sdk/databricks/arm-databricks/src/operations/index.ts index 06215340107a..4d677d472f77 100644 --- a/sdk/databricks/arm-databricks/src/operations/index.ts +++ b/sdk/databricks/arm-databricks/src/operations/index.ts @@ -11,4 +11,5 @@ export * from "./workspaces"; export * from "./operations"; export * from "./privateLinkResources"; export * from "./privateEndpointConnections"; +export * from "./outboundNetworkDependenciesEndpoints"; export * from "./vNetPeering"; diff --git a/sdk/databricks/arm-databricks/src/operations/operations.ts b/sdk/databricks/arm-databricks/src/operations/operations.ts index ee8855264031..f30f4e77f136 100644 --- a/sdk/databricks/arm-databricks/src/operations/operations.ts +++ b/sdk/databricks/arm-databricks/src/operations/operations.ts @@ -84,7 +84,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Databricks/operations", queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -108,7 +108,7 @@ const listNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts b/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts new file mode 100644 index 000000000000..37811b36aa27 --- /dev/null +++ b/sdk/databricks/arm-databricks/src/operations/outboundNetworkDependenciesEndpoints.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/outboundNetworkDependenciesEndpointsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext"; + +/** Class representing a OutboundNetworkDependenciesEndpoints. */ +export class OutboundNetworkDependenciesEndpoints { + private readonly client: AzureDatabricksManagementClientContext; + + /** + * Create a OutboundNetworkDependenciesEndpoints. + * @param {AzureDatabricksManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureDatabricksManagementClientContext) { + this.client = client; + } + + /** + * Gets the list of endpoints that VNET Injected Workspace's Cluster call Azure Databricks Control + * Plane. You must configure outbound access to these endpoints. For more information, see + * https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr + * @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + * specified Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts b/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts index 157402cae6aa..314ae095d72e 100644 --- a/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts +++ b/sdk/databricks/arm-databricks/src/operations/privateEndpointConnections.ts @@ -210,7 +210,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -236,7 +236,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.privateEndpointConnectionName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -262,7 +262,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.privateEndpointConnectionName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -298,7 +298,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.privateEndpointConnectionName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -322,7 +322,7 @@ const listNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts b/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts index 70ff1d3234d8..3ebecdd9f75e 100644 --- a/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts +++ b/sdk/databricks/arm-databricks/src/operations/privateLinkResources.ts @@ -136,7 +136,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -162,7 +162,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.groupId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -186,7 +186,7 @@ const listNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts b/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts index 7d36413fb6be..ef1afba11293 100644 --- a/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts +++ b/sdk/databricks/arm-databricks/src/operations/vNetPeering.ts @@ -204,7 +204,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.peeringName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -230,7 +230,7 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -256,7 +256,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.peeringName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -282,7 +282,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.peeringName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -316,7 +316,7 @@ const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion1 + 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 57faea6c5ebc..bdb9b0e6f7eb 100644 --- a/sdk/databricks/arm-databricks/src/operations/workspaces.ts +++ b/sdk/databricks/arm-databricks/src/operations/workspaces.ts @@ -274,7 +274,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -298,7 +298,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -321,7 +321,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -346,7 +346,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -371,7 +371,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -406,7 +406,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -438,7 +438,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -462,7 +462,7 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage