Skip to content

Commit

Permalink
CodeGen from PR 19099 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 00071be6509275a948066872772ffef59e7c1fa5 into 271c819e255b6e437fd84a429c0d7b480052e6ab
  • Loading branch information
SDKAuto committed May 17, 2022
1 parent 4663918 commit 3337729
Show file tree
Hide file tree
Showing 10 changed files with 858 additions and 371 deletions.
32 changes: 20 additions & 12 deletions sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
# Release History

## 3.1.0-beta.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 3.1.0-beta.1 (2022-04-26)

## 3.1.0-beta.2 (2022-05-17)

**Features**

- Added Interface AgentConfiguration
- Added Interface CloudMetadata
- Added Interface ConfigurationExtension
- Added Interface OSProfileLinuxConfiguration
- Added Interface OSProfileWindowsConfiguration
- Added Interface PrivateEndpointConnectionDataModel
- Added Interface ServiceStatus
- Added Interface ServiceStatuses
- Added Type Alias AssessmentModeTypes
- Added Type Alias PatchModeTypes
- Interface HybridComputePrivateLinkScopeProperties has a new optional parameter privateEndpointConnections
- Interface MachineExtensionProperties has a new optional parameter enableAutomaticUpgrade
- Interface MachineExtensionUpdateProperties has a new optional parameter enableAutomaticUpgrade
- Interface MachineProperties has a new optional parameter agentConfiguration
- Interface MachineProperties has a new optional parameter cloudMetadata
- Interface MachineProperties has a new optional parameter mssqlDiscovered
- Interface MachineProperties has a new optional parameter osType
- Interface MachineProperties has a new optional parameter serviceStatuses
- Interface MachineUpdateProperties has a new optional parameter cloudMetadata
- Interface MachineUpdateProperties has a new optional parameter osProfile
- Interface OperationValue has a new optional parameter isDataAction
- Interface OSProfile has a new optional parameter linuxConfiguration
- Interface OSProfile has a new optional parameter windowsConfiguration
- Interface PrivateEndpointConnectionProperties has a new optional parameter groupIds
- Type Alias Machine has a new parameter resources
- Added Enum KnownAssessmentModeTypes
- Added Enum KnownPatchModeTypes


## 3.0.0 (2022-01-18)
Expand Down
12 changes: 6 additions & 6 deletions sdk/hybridcompute/arm-hybridcompute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a",
"readme": "specification\\hybridcompute\\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\\hybridcompute\\resource-manager\\readme.md --use=@autorest/[email protected].20220408.1 --generate-sample=true",
"commit": "b89c7fd0416adb240f7b69906e4c6ef3f69c1f34",
"readme": "specification/hybridcompute/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/[email protected].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/[email protected].20220408.1"
}
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
"use": "@autorest/[email protected].20220425.1"
}
20 changes: 7 additions & 13 deletions sdk/hybridcompute/arm-hybridcompute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/hybridcompute/arm-hybridcompute",
"repository": {
Expand Down Expand Up @@ -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"
},
Expand All @@ -106,13 +108,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hybridcompute?view=azure-node-preview"
}
}
"autoPublish": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';

// @public
export interface AgentConfiguration {
readonly extensionsAllowList?: ConfigurationExtension[];
readonly extensionsBlockList?: ConfigurationExtension[];
readonly extensionsEnabled?: string;
readonly guestConfigurationEnabled?: string;
readonly incomingConnectionsPorts?: string[];
readonly proxyBypass?: string[];
readonly proxyUrl?: string;
}

// @public
export type AssessmentModeTypes = string;

// @public
export interface CloudMetadata {
readonly provider?: string;
}

// @public
export interface ConfigurationExtension {
readonly publisher?: string;
readonly type?: string;
}

// @public (undocumented)
export interface ConnectionDetail {
readonly groupId?: string;
Expand Down Expand Up @@ -109,6 +134,14 @@ export interface Identity {
// @public
export type InstanceViewTypes = string;

// @public
export enum KnownAssessmentModeTypes {
// (undocumented)
AutomaticByPlatform = "AutomaticByPlatform",
// (undocumented)
ImageDefault = "ImageDefault"
}

// @public
export enum KnownCreatedByType {
// (undocumented)
Expand All @@ -127,6 +160,18 @@ export enum KnownInstanceViewTypes {
InstanceView = "instanceView"
}

// @public
export enum KnownPatchModeTypes {
// (undocumented)
AutomaticByOS = "AutomaticByOS",
// (undocumented)
AutomaticByPlatform = "AutomaticByPlatform",
// (undocumented)
ImageDefault = "ImageDefault",
// (undocumented)
Manual = "Manual"
}

// @public
export enum KnownPublicNetworkAccessType {
Disabled = "Disabled",
Expand Down Expand Up @@ -163,6 +208,7 @@ export interface LocationData {

// @public
export type Machine = TrackedResource & {
resources?: MachineExtension[];
properties?: MachineProperties;
identity?: Identity;
readonly systemData?: SystemData;
Expand Down Expand Up @@ -194,6 +240,7 @@ export interface MachineExtensionInstanceViewStatus {
// @public
export interface MachineExtensionProperties {
autoUpgradeMinorVersion?: boolean;
enableAutomaticUpgrade?: boolean;
forceUpdateTag?: string;
instanceView?: MachineExtensionInstanceView;
protectedSettings?: Record<string, unknown>;
Expand Down Expand Up @@ -277,6 +324,7 @@ export type MachineExtensionUpdate = ResourceUpdate & {
// @public
export interface MachineExtensionUpdateProperties {
autoUpgradeMinorVersion?: boolean;
enableAutomaticUpgrade?: boolean;
forceUpdateTag?: string;
protectedSettings?: Record<string, unknown>;
publisher?: string;
Expand All @@ -301,8 +349,10 @@ export interface MachineListResult {
// @public
export interface MachineProperties {
readonly adFqdn?: string;
readonly agentConfiguration?: AgentConfiguration;
readonly agentVersion?: string;
clientPublicKey?: string;
cloudMetadata?: CloudMetadata;
readonly detectedProperties?: {
[propertyName: string]: string;
};
Expand All @@ -323,6 +373,7 @@ export interface MachineProperties {
parentClusterResourceId?: string;
privateLinkScopeResourceId?: string;
readonly provisioningState?: string;
serviceStatuses?: ServiceStatuses;
readonly status?: StatusTypes;
vmId?: string;
readonly vmUuid?: string;
Expand Down Expand Up @@ -384,6 +435,7 @@ export type MachineUpdate = ResourceUpdate & {

// @public
export interface MachineUpdateProperties {
cloudMetadata?: CloudMetadata;
locationData?: LocationData;
osProfile?: OSProfile;
parentClusterResourceId?: string;
Expand All @@ -410,6 +462,7 @@ export type OperationsListResponse = OperationListResult;
// @public
export interface OperationValue {
display?: OperationValueDisplay;
readonly isDataAction?: boolean;
readonly name?: string;
readonly origin?: string;
}
Expand All @@ -431,14 +484,19 @@ export interface OSProfile {

// @public
export interface OSProfileLinuxConfiguration {
assessmentMode?: string;
assessmentMode?: AssessmentModeTypes;
patchMode?: PatchModeTypes;
}

// @public
export interface OSProfileWindowsConfiguration {
assessmentMode?: string;
assessmentMode?: AssessmentModeTypes;
patchMode?: PatchModeTypes;
}

// @public
export type PatchModeTypes = string;

// @public
export type PrivateEndpointConnection = ProxyResource & {
properties?: PrivateEndpointConnectionProperties;
Expand All @@ -461,6 +519,7 @@ export interface PrivateEndpointConnectionListResult {

// @public
export interface PrivateEndpointConnectionProperties {
readonly groupIds?: string[];
privateEndpoint?: PrivateEndpointProperty;
privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty;
readonly provisioningState?: string;
Expand Down Expand Up @@ -690,6 +749,18 @@ export interface ResourceUpdate {
};
}

// @public
export interface ServiceStatus {
startupType?: string;
status?: string;
}

// @public
export interface ServiceStatuses {
extensionService?: ServiceStatus;
guestConfigurationService?: ServiceStatus;
}

// @public
export type StatusLevelTypes = string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
import { LroImpl } from "./lroImpl";
Expand Down Expand Up @@ -114,13 +119,42 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-06-10-preview";
this.apiVersion = options.apiVersion || "2022-05-10-preview";
this.machines = new MachinesImpl(this);
this.machineExtensions = new MachineExtensionsImpl(this);
this.operations = new OperationsImpl(this);
this.privateLinkScopes = new PrivateLinkScopesImpl(this);
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(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 item.replace(/(?<==).*$/, apiVersion);
} else {
return item;
}
});
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
};
this.pipeline.addPolicy(apiVersionPolicy);
}

/**
Expand Down
Loading

0 comments on commit 3337729

Please sign in to comment.