Skip to content

Commit 92c7913

Browse files
author
SDKAuto
committed
CodeGen from PR 15737 in Azure/azure-rest-api-specs
Merge 247d48840d32029575474694006e51506db752b9 into f9e4843e2ed3494e8bd66a92c3e7f65655f58f46
1 parent d0f244f commit 92c7913

22 files changed

+3689
-780
lines changed

sdk/hybridcompute/arm-hybridcompute/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/hybridcompute/arm-hybridcompute/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure HybridComputeManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for HybridComputeManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for HybridComputeManagementClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-hybridcompute @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
4139
#### nodejs - Authentication, client creation, and get machines as an example written in JavaScript.
4240

4341
##### Sample code
@@ -52,9 +50,9 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5250
const creds = new DefaultAzureCredential();
5351
const client = new HybridComputeManagementClient(creds, subscriptionId);
5452
const resourceGroupName = "testresourceGroupName";
55-
const name = "testname";
53+
const machineName = "testmachineName";
5654
const expand = "instanceView";
57-
client.machines.get(resourceGroupName, name, expand).then((result) => {
55+
client.machines.get(resourceGroupName, machineName, expand).then((result) => {
5856
console.log("The result is:");
5957
console.log(result);
6058
}).catch((err) => {
@@ -88,13 +86,13 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8886
const credential = new InteractiveBrowserCredential(
8987
{
9088
clientId: "<client id for your Azure AD app>",
91-
tenantId: "<optional tenant for your organization>"
89+
tenant: "<optional tenant for your organization>"
9290
});
9391
const client = new Azure.ArmHybridcompute.HybridComputeManagementClient(creds, subscriptionId);
9492
const resourceGroupName = "testresourceGroupName";
95-
const name = "testname";
93+
const machineName = "testmachineName";
9694
const expand = "instanceView";
97-
client.machines.get(resourceGroupName, name, expand).then((result) => {
95+
client.machines.get(resourceGroupName, machineName, expand).then((result) => {
9896
console.log("The result is:");
9997
console.log(result);
10098
}).catch((err) => {

sdk/hybridcompute/arm-hybridcompute/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/hybridcompute/arm-hybridcompute",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/hybridcompute/arm-hybridcompute",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/hybridcompute/arm-hybridcompute/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,8 +9,10 @@
109

1110
import * as msRest from "@azure/ms-rest-js";
1211
import { TokenCredential } from "@azure/core-auth";
12+
import * as msRestAzure from "@azure/ms-rest-azure-js";
1313
import * as Models from "./models";
1414
import * as Mappers from "./models/mappers";
15+
import * as Parameters from "./models/parameters";
1516
import * as operations from "./operations";
1617
import { HybridComputeManagementClientContext } from "./hybridComputeManagementClientContext";
1718

@@ -21,6 +22,9 @@ class HybridComputeManagementClient extends HybridComputeManagementClientContext
2122
machines: operations.Machines;
2223
machineExtensions: operations.MachineExtensions;
2324
operations: operations.Operations;
25+
privateLinkScopes: operations.PrivateLinkScopes;
26+
privateLinkResources: operations.PrivateLinkResources;
27+
privateEndpointConnections: operations.PrivateEndpointConnections;
2428

2529
/**
2630
* Initializes a new instance of the HybridComputeManagementClient class.
@@ -30,19 +34,84 @@ class HybridComputeManagementClient extends HybridComputeManagementClientContext
3034
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
3135
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
3236
* @azure/ms-rest-browserauth are also supported.
33-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
34-
* subscription. The subscription ID forms part of the URI for every service call.
37+
* @param subscriptionId The ID of the target subscription.
3538
* @param [options] The parameter options
3639
*/
3740
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.HybridComputeManagementClientOptions) {
3841
super(credentials, subscriptionId, options);
3942
this.machines = new operations.Machines(this);
4043
this.machineExtensions = new operations.MachineExtensions(this);
4144
this.operations = new operations.Operations(this);
45+
this.privateLinkScopes = new operations.PrivateLinkScopes(this);
46+
this.privateLinkResources = new operations.PrivateLinkResources(this);
47+
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
48+
}
49+
50+
/**
51+
* The operation to Upgrade Machine Extensions.
52+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
53+
* @param machineName The name of the hybrid machine.
54+
* @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation.
55+
* @param [options] The optional parameters
56+
* @returns Promise<msRest.RestResponse>
57+
*/
58+
upgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: Models.MachineExtensionUpgrade, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
59+
return this.beginUpgradeExtensions(resourceGroupName,machineName,extensionUpgradeParameters,options)
60+
.then(lroPoller => lroPoller.pollUntilFinished());
61+
}
62+
63+
/**
64+
* The operation to Upgrade Machine Extensions.
65+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
66+
* @param machineName The name of the hybrid machine.
67+
* @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation.
68+
* @param [options] The optional parameters
69+
* @returns Promise<msRestAzure.LROPoller>
70+
*/
71+
beginUpgradeExtensions(resourceGroupName: string, machineName: string, extensionUpgradeParameters: Models.MachineExtensionUpgrade, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
72+
return this.sendLRORequest(
73+
{
74+
resourceGroupName,
75+
machineName,
76+
extensionUpgradeParameters,
77+
options
78+
},
79+
beginUpgradeExtensionsOperationSpec,
80+
options);
4281
}
4382
}
4483

4584
// Operation Specifications
85+
const serializer = new msRest.Serializer(Mappers);
86+
const beginUpgradeExtensionsOperationSpec: msRest.OperationSpec = {
87+
httpMethod: "POST",
88+
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions",
89+
urlParameters: [
90+
Parameters.subscriptionId,
91+
Parameters.resourceGroupName,
92+
Parameters.machineName0
93+
],
94+
queryParameters: [
95+
Parameters.apiVersion
96+
],
97+
headerParameters: [
98+
Parameters.acceptLanguage
99+
],
100+
requestBody: {
101+
parameterPath: "extensionUpgradeParameters",
102+
mapper: {
103+
...Mappers.MachineExtensionUpgrade,
104+
required: true
105+
}
106+
},
107+
responses: {
108+
202: {},
109+
default: {
110+
bodyMapper: Mappers.ErrorResponse
111+
}
112+
},
113+
serializer
114+
};
46115

47116
export {
48117
HybridComputeManagementClient,

sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,16 +9,16 @@
109

1110
import * as Models from "./models";
1211
import * as msRest from "@azure/ms-rest-js";
13-
import { TokenCredential } from "@azure/core-auth";
1412
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1514

1615
const packageName = "@azure/arm-hybridcompute";
1716
const packageVersion = "2.1.1";
1817

1918
export class HybridComputeManagementClientContext extends msRestAzure.AzureServiceClient {
2019
credentials: msRest.ServiceClientCredentials | TokenCredential;
21-
subscriptionId: string;
2220
apiVersion?: string;
21+
subscriptionId: string;
2322

2423
/**
2524
* Initializes a new instance of the HybridComputeManagementClient class.
@@ -29,8 +28,7 @@ export class HybridComputeManagementClientContext extends msRestAzure.AzureServi
2928
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
3029
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
3130
* @azure/ms-rest-browserauth are also supported.
32-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
33-
* subscription. The subscription ID forms part of the URI for every service call.
31+
* @param subscriptionId The ID of the target subscription.
3432
* @param [options] The parameter options
3533
*/
3634
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.HybridComputeManagementClientOptions) {
@@ -51,7 +49,7 @@ export class HybridComputeManagementClientContext extends msRestAzure.AzureServi
5149

5250
super(credentials, options);
5351

54-
this.apiVersion = '2020-08-02';
52+
this.apiVersion = '2021-06-10-preview';
5553
this.acceptLanguage = 'en-US';
5654
this.longRunningOperationRetryTimeout = 30;
5755
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

0 commit comments

Comments
 (0)