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 797fba70a9f7b1e6c6181def91fe53698cfdae96 into 2139e4c0f3a5df27ed4b08008c20d76410a58f91
  • Loading branch information
SDKAuto committed Jun 15, 2022
1 parent bce15c9 commit 8eee0fc
Show file tree
Hide file tree
Showing 10 changed files with 734 additions and 201 deletions.
34 changes: 22 additions & 12 deletions sdk/hybridcompute/arm-hybridcompute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# 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-06-15)

**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 AgentConfigurationMode
- 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 KnownAgentConfigurationMode
- 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": "c981f5925609da09f9d690a93a35e0b9bd95893b",
"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.2",
"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,35 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';

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

// @public
export type AgentConfigurationMode = 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 +138,22 @@ export interface Identity {
// @public
export type InstanceViewTypes = string;

// @public
export enum KnownAgentConfigurationMode {
// (undocumented)
Full = "full",
// (undocumented)
Monitor = "monitor"
}

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

// @public
export enum KnownCreatedByType {
// (undocumented)
Expand All @@ -127,6 +172,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 @@ -164,6 +221,7 @@ export interface LocationData {
// @public
export type Machine = TrackedResource & {
properties?: MachineProperties;
readonly resources?: MachineExtension[];
identity?: Identity;
readonly systemData?: SystemData;
};
Expand Down Expand Up @@ -194,6 +252,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 +336,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 +361,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 +385,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 +447,7 @@ export type MachineUpdate = ResourceUpdate & {

// @public
export interface MachineUpdateProperties {
cloudMetadata?: CloudMetadata;
locationData?: LocationData;
osProfile?: OSProfile;
parentClusterResourceId?: string;
Expand All @@ -410,6 +474,7 @@ export type OperationsListResponse = OperationListResult;
// @public
export interface OperationValue {
display?: OperationValueDisplay;
readonly isDataAction?: boolean;
readonly name?: string;
readonly origin?: string;
}
Expand All @@ -431,14 +496,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 +531,7 @@ export interface PrivateEndpointConnectionListResult {

// @public
export interface PrivateEndpointConnectionProperties {
readonly groupIds?: string[];
privateEndpoint?: PrivateEndpointProperty;
privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty;
readonly provisioningState?: string;
Expand Down Expand Up @@ -690,6 +761,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 8eee0fc

Please sign in to comment.