Skip to content

Commit

Permalink
CodeGen from PR 12657 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3b39238d652e67f9b74c5c188419e56047894573 into a57e89f8c3e1215201694cc0d6e9a51842573df0
  • Loading branch information
SDKAuto committed Jan 28, 2021
1 parent d05ec37 commit 8df3e74
Show file tree
Hide file tree
Showing 21 changed files with 1,490 additions and 105 deletions.
2 changes: 1 addition & 1 deletion sdk/azurestack/arm-azurestack/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 4 additions & 5 deletions sdk/azurestack/arm-azurestack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-azurestack

### How to use

#### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
#### nodejs - client creation and list operations as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { AzureStackManagementClient, AzureStackManagementModels, AzureStackManagementMappers } from "@azure/arm-azurestack";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { AzureStackManagementClient } = require("@azure/arm-azurestack");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/azurestack/arm-azurestack/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
13 changes: 8 additions & 5 deletions sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand All @@ -18,9 +17,11 @@ import { AzureStackManagementClientContext } from "./azureStackManagementClientC
class AzureStackManagementClient extends AzureStackManagementClientContext {
// Operation groups
operations: operations.Operations;
cloudManifestFile: operations.CloudManifestFile;
customerSubscriptions: operations.CustomerSubscriptions;
products: operations.Products;
registrations: operations.Registrations;
customerSubscriptions: operations.CustomerSubscriptions;
linkedSubscriptions: operations.LinkedSubscriptions;

/**
* Initializes a new instance of the AzureStackManagementClient class.
Expand All @@ -32,9 +33,11 @@ class AzureStackManagementClient extends AzureStackManagementClientContext {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureStackManagementClientOptions) {
super(credentials, subscriptionId, options);
this.operations = new operations.Operations(this);
this.cloudManifestFile = new operations.CloudManifestFile(this);
this.customerSubscriptions = new operations.CustomerSubscriptions(this);
this.products = new operations.Products(this);
this.registrations = new operations.Registrations(this);
this.customerSubscriptions = new operations.CustomerSubscriptions(this);
this.linkedSubscriptions = new operations.LinkedSubscriptions(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down Expand Up @@ -45,7 +44,7 @@ export class AzureStackManagementClientContext extends msRestAzure.AzureServiceC

super(credentials, options);

this.apiVersion = '2017-06-01';
this.apiVersion = '2020-06-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* 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 {
BaseResource,
CloudManifestFileDeploymentData,
CloudManifestFileProperties,
CloudManifestFileResponse,
Compatibility,
CustomerSubscription,
ErrorDetails,
ErrorResponse,
IconUris,
LinkedSubscription,
Product,
ProductLink,
ProductProperties,
Registration,
Resource,
SystemData,
TrackedResource
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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 {
BaseResource,
CloudError,
CloudManifestFileDeploymentData,
CloudManifestFileProperties,
CloudManifestFileResponse,
Compatibility,
CustomerSubscription,
CustomerSubscriptionList,
ErrorDetails,
ErrorResponse,
IconUris,
LinkedSubscription,
Product,
ProductLink,
ProductProperties,
Registration,
Resource,
SystemData,
TrackedResource
} from "../models/mappers";
Loading

0 comments on commit 8df3e74

Please sign in to comment.