Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR azurestack/resource-manager] typo: Microsoft.AzureStack #4218

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lib/services/azurestackManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
83 changes: 41 additions & 42 deletions lib/services/azurestackManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
# Microsoft Azure SDK for Node.js - AzureStackManagement

This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version: 6.x.x or higher**

## Features


## How to Install

```bash
npm install azure-arm-azurestack
```

## How to Use

### Authentication, client creation and listing automation accounts as an example

```javascript
const msRestAzure = require('ms-rest-azure');
const AzureStackManagement = require("azure-arm-azurestack");

// Interactive Login
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful,
// the user will get a DeviceTokenCredentials object.
msRestAzure.interactiveLogin()
.then((credentials) => {
let client = new AzureStackManagement(credentials, 'your-subscription-id');
client.products.listByResourceGroup('test-rg')
.then((products) => {
console.log('List of Products:');
console.dir(products, {depth: null, colors: true});
});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
```

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
---
uid: azure-arm-azurestack
summary: *content

---
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.**
## Microsoft Azure SDK for Node.js - AzureStackManagementClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

### Features


### How to Install

```bash
npm install azure-arm-azurestack
```

### How to use

#### Authentication, client creation and list operations as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const AzureStackManagementClient = require("azure-arm-azurestack");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new AzureStackManagementClient(creds, subscriptionId);
return client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});

### Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default class AzureStackManagementClient extends AzureServiceClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class AzureStackManagementClient extends ServiceClient {
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class ActivationKeyResult {
/**
* Create a ActivationKeyResult.
* @member {string} [activationKey] Azure Stack activation key.
* @property {string} [activationKey] Azure Stack activation key.
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
const models = require('./index');

/**
* Customer subcription.
* Customer subscription.
*
* @extends models['Resource']
*/
class CustomerSubscription extends models['Resource'] {
/**
* Create a CustomerSubscription.
* @member {string} [tenantId] Tenant Id.
* @property {string} [tenantId] Tenant Id.
*/
constructor() {
super();
Expand Down Expand Up @@ -64,29 +64,6 @@ class CustomerSubscription extends models['Resource'] {
name: 'String'
}
},
location: {
required: true,
isConstant: true,
serializedName: 'location',
defaultValue: 'global',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
etag: {
required: false,
serializedName: 'etag',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class CustomerSubscriptionList extends Array {
/**
* Create a CustomerSubscriptionList.
* @member {string} [nextLink] URI to the next page.
* @property {string} [nextLink] URI to the next page.
*/
constructor() {
super();
Expand Down
4 changes: 2 additions & 2 deletions lib/services/azurestackManagement/lib/models/dataDiskImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
class DataDiskImage {
/**
* Create a DataDiskImage.
* @member {number} [lun] The LUN.
* @member {string} [sourceBlobSasUri] SAS key for source blob.
* @property {number} [lun] The LUN.
* @property {string} [sourceBlobSasUri] SAS key for source blob.
*/
constructor() {
}
Expand Down
10 changes: 5 additions & 5 deletions lib/services/azurestackManagement/lib/models/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
class Display {
/**
* Create a Display.
* @member {string} [provider] The localized, friendly version of the
* @property {string} [provider] The localized, friendly version of the
* resource provider name.
* @member {string} [resource] The localized, friendly version of the
* @property {string} [resource] The localized, friendly version of the
* resource type related to this action or operation; the resource type
* should match the public documentation for the resource provider.
* @member {string} [operation] The localized, friendly name for the
* @property {string} [operation] The localized, friendly name for the
* operation. Use the name as it will displayed to the user.
* @member {string} [description] The localized, friendly description for the
* operation. The description will be displayed to the user. It should be
* @property {string} [description] The localized, friendly description for
* the operation. The description will be displayed to the user. It should be
* thorough and concise for used in both tooltips and detailed views.
*/
constructor() {
Expand Down
72 changes: 72 additions & 0 deletions lib/services/azurestackManagement/lib/models/errorDetails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* The details of the error.
*
*/
class ErrorDetails {
/**
* Create a ErrorDetails.
* @property {string} [code] Error code.
* @property {string} [message] Error message indicating why the operation
* failed.
* @property {string} [target] The target of the particular error.
*/
constructor() {
}

/**
* Defines the metadata of ErrorDetails
*
* @returns {object} metadata of ErrorDetails
*
*/
mapper() {
return {
required: false,
serializedName: 'ErrorDetails',
type: {
name: 'Composite',
className: 'ErrorDetails',
modelProperties: {
code: {
required: false,
readOnly: true,
serializedName: 'code',
type: {
name: 'String'
}
},
message: {
required: false,
readOnly: true,
serializedName: 'message',
type: {
name: 'String'
}
},
target: {
required: false,
readOnly: true,
serializedName: 'target',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ErrorDetails;
58 changes: 58 additions & 0 deletions lib/services/azurestackManagement/lib/models/errorResponse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Error response indicates that the service is not able to process the
* incoming request. The reason is provided in the error message.
*
*/
class ErrorResponse {
/**
* Create a ErrorResponse.
* @property {object} [error] The details of the error.
* @property {string} [error.code] Error code.
* @property {string} [error.message] Error message indicating why the
* operation failed.
* @property {string} [error.target] The target of the particular error.
*/
constructor() {
}

/**
* Defines the metadata of ErrorResponse
*
* @returns {object} metadata of ErrorResponse
*
*/
mapper() {
return {
required: false,
serializedName: 'ErrorResponse',
type: {
name: 'Composite',
className: 'ErrorResponse',
modelProperties: {
error: {
required: false,
serializedName: 'error',
type: {
name: 'Composite',
className: 'ErrorDetails'
}
}
}
}
};
}
}

module.exports = ErrorResponse;
Loading