Skip to content

Commit

Permalink
CodeGen from PR 21765 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 64afba8eef1cc3b7e3ffa1b64d66d7d669983f5c into 675f5a321159c28656edd4b2ee5fd5de2b0ef40d
  • Loading branch information
SDKAuto committed Dec 6, 2022
1 parent d3f1845 commit 1233f81
Show file tree
Hide file tree
Showing 22 changed files with 1,848 additions and 416 deletions.
16 changes: 3 additions & 13 deletions sdk/databricks/arm-databricks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# Release History

## 3.0.0-beta.5 (2022-12-06)

## 3.0.0-beta.5 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 3.0.0-beta.4 (2022-11-21)

The package of @azure/arm-databricks is using our next generation design principles since version 3.0.0-beta.4, which contains breaking changes.
The package of @azure/arm-databricks is using our next generation design principles since version 3.0.0-beta.5, which contains breaking changes.

To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

Expand Down
10 changes: 5 additions & 5 deletions sdk/databricks/arm-databricks/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "7086ee861c3a6196bb98f8b327af11d03e545a05",
"readme": "specification\\databricks\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\databricks\\resource-manager\\readme.md --use=@autorest/[email protected].3.20221108.1 --generate-sample=true",
"commit": "74abc2bdcf26359e02418b1fe391471627228e33",
"readme": "specification/databricks/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.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/[email protected].4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/[email protected].3.20221108.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.2",
"use": "@autorest/[email protected].4"
}
12 changes: 2 additions & 10 deletions sdk/databricks/arm-databricks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,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
}
145 changes: 143 additions & 2 deletions sdk/databricks/arm-databricks/review/arm-databricks.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,104 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';

// @public
export interface AccessConnector extends TrackedResource {
identity?: ManagedServiceIdentity;
properties?: AccessConnectorProperties;
readonly systemData?: SystemData;
}

// @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<PollerLike<PollOperationState<AccessConnectorsCreateOrUpdateResponse>, AccessConnectorsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, connectorName: string, parameters: AccessConnector, options?: AccessConnectorsCreateOrUpdateOptionalParams): Promise<AccessConnectorsCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, connectorName: string, options?: AccessConnectorsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, connectorName: string, options?: AccessConnectorsDeleteOptionalParams): Promise<void>;
beginUpdate(resourceGroupName: string, connectorName: string, parameters: AccessConnectorUpdate, options?: AccessConnectorsUpdateOptionalParams): Promise<PollerLike<PollOperationState<AccessConnectorsUpdateResponse>, AccessConnectorsUpdateResponse>>;
beginUpdateAndWait(resourceGroupName: string, connectorName: string, parameters: AccessConnectorUpdate, options?: AccessConnectorsUpdateOptionalParams): Promise<AccessConnectorsUpdateResponse>;
get(resourceGroupName: string, connectorName: string, options?: AccessConnectorsGetOptionalParams): Promise<AccessConnectorsGetResponse>;
listByResourceGroup(resourceGroupName: string, options?: AccessConnectorsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<AccessConnector>;
listBySubscription(options?: AccessConnectorsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<AccessConnector>;
}

// @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?: ManagedServiceIdentity;
tags?: {
[propertyName: string]: string;
};
}

// @public
export interface AddressSpace {
addressPrefixes?: string[];
Expand All @@ -21,7 +119,7 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureDatabricksManagementClientOptionalParams);
// (undocumented)
apiVersion: string;
accessConnectors: AccessConnectors;
// (undocumented)
operations: Operations;
// (undocumented)
Expand All @@ -41,7 +139,6 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
// @public
export interface AzureDatabricksManagementClientOptionalParams extends coreClient.ServiceClientOptions {
$host?: string;
apiVersion?: string;
endpoint?: string;
}

Expand All @@ -68,6 +165,7 @@ export interface Encryption {

// @public
export interface EncryptionEntitiesDefinition {
managedDisk?: ManagedDiskEncryption;
managedServices?: EncryptionV2;
}

Expand Down Expand Up @@ -165,6 +263,14 @@ export enum KnownKeySource {
MicrosoftKeyvault = "Microsoft.Keyvault"
}

// @public
export enum KnownManagedServiceIdentityType {
None = "None",
SystemAssigned = "SystemAssigned",
SystemAssignedUserAssigned = "SystemAssigned,UserAssigned",
UserAssigned = "UserAssigned"
}

// @public
export enum KnownPeeringProvisioningState {
Deleting = "Deleting",
Expand Down Expand Up @@ -225,13 +331,40 @@ export enum KnownRequiredNsgRules {
NoAzureServiceRules = "NoAzureServiceRules"
}

// @public
export interface ManagedDiskEncryption {
keySource: EncryptionKeySource;
keyVaultProperties: ManagedDiskEncryptionKeyVaultProperties;
rotationToLatestKeyVersionEnabled?: boolean;
}

// @public
export interface ManagedDiskEncryptionKeyVaultProperties {
keyName: string;
keyVaultUri: string;
keyVersion: string;
}

// @public
export interface ManagedIdentityConfiguration {
readonly principalId?: string;
readonly tenantId?: string;
readonly type?: string;
}

// @public
export interface ManagedServiceIdentity {
readonly principalId?: string;
readonly tenantId?: string;
type: ManagedServiceIdentityType;
userAssignedIdentities?: {
[propertyName: string]: UserAssignedIdentity;
};
}

// @public
export type ManagedServiceIdentityType = string;

// @public
export interface Operation {
display?: OperationDisplay;
Expand Down Expand Up @@ -452,6 +585,12 @@ export interface TrackedResource extends Resource {
};
}

// @public
export interface UserAssignedIdentity {
readonly clientId?: string;
readonly principalId?: string;
}

// @public
export interface VirtualNetworkPeering {
allowForwardedTraffic?: boolean;
Expand Down Expand Up @@ -536,7 +675,9 @@ export interface Workspace extends TrackedResource {
authorizations?: WorkspaceProviderAuthorization[];
createdBy?: CreatedBy;
readonly createdDateTime?: Date;
diskEncryptionSetId?: string;
encryption?: WorkspacePropertiesEncryption;
managedDiskIdentity?: ManagedIdentityConfiguration;
managedResourceGroupId: string;
parameters?: WorkspaceCustomParameters;
readonly privateEndpointConnections?: PrivateEndpointConnection[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@

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 {
AccessConnectorsImpl,
WorkspacesImpl,
OperationsImpl,
PrivateLinkResourcesImpl,
Expand All @@ -23,6 +19,7 @@ import {
VNetPeeringImpl
} from "./operations";
import {
AccessConnectors,
Workspaces,
Operations,
PrivateLinkResources,
Expand All @@ -34,7 +31,6 @@ import { AzureDatabricksManagementClientOptionalParams } from "./models";

export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;

/**
Expand Down Expand Up @@ -117,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.accessConnectors = new AccessConnectorsImpl(this);
this.workspaces = new WorkspacesImpl(this);
this.operations = new OperationsImpl(this);
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
Expand All @@ -126,37 +122,9 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
this
);
this.vNetPeering = new VNetPeeringImpl(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<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
const newParams = param[1].split("&").map((item) => {
if (item.indexOf("api-version") > -1) {
return "api-version=" + apiVersion;
} else {
return item;
}
});
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
};
this.pipeline.addPolicy(apiVersionPolicy);
}

accessConnectors: AccessConnectors;
workspaces: Workspaces;
operations: Operations;
privateLinkResources: PrivateLinkResources;
Expand Down
Loading

0 comments on commit 1233f81

Please sign in to comment.