This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 42363c2f9c61172f0ebac88d32cb992d26dc73be
Merge pull request #1 from feiyushi/feshi-imagebuilder-preview2019 operation_id: plural forms
- Loading branch information
1 parent
f995642
commit 21e98e9
Showing
38 changed files
with
8,012 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
uid: azure-arm-imagebuilder | ||
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 - ImageBuilderClient | ||
|
||
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-imagebuilder | ||
``` | ||
|
||
### How to use | ||
|
||
#### Authentication, client creation, and list virtualMachineImageTemplates as an example. | ||
|
||
```javascript | ||
const msRestAzure = require("ms-rest-azure"); | ||
const ImageBuilderClient = require("azure-arm-imagebuilder"); | ||
msRestAzure.interactiveLogin().then((creds) => { | ||
const subscriptionId = "<Subscription_Id>"; | ||
const client = new ImageBuilderClient(creds, subscriptionId); | ||
|
||
return client.virtualMachineImageTemplates.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) |
63 changes: 63 additions & 0 deletions
63
lib/services/imagebuilderManagement/lib/imageBuilderClient.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import { ServiceClientCredentials } from 'ms-rest'; | ||
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; | ||
import * as models from "./models"; | ||
import * as operations from "./operations"; | ||
|
||
export default class ImageBuilderClient extends AzureServiceClient { | ||
/** | ||
* Initializes a new instance of the ImageBuilderClient class. | ||
* @constructor | ||
* | ||
* @class | ||
* @param {credentials} credentials - Credentials needed for the client to connect to Azure. | ||
* | ||
* @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call. | ||
* | ||
* @param {string} [baseUri] - The base URI of the service. | ||
* | ||
* @param {object} [options] - The parameter options | ||
* | ||
* @param {Array} [options.filters] - Filters to be added to the request pipeline | ||
* | ||
* @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] - 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: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); | ||
|
||
credentials: ServiceClientCredentials; | ||
|
||
subscriptionId: string; | ||
|
||
apiVersion: string; | ||
|
||
acceptLanguage: string; | ||
|
||
longRunningOperationRetryTimeout: number; | ||
|
||
generateClientRequestId: boolean; | ||
|
||
// Operation groups | ||
virtualMachineImageTemplates: operations.VirtualMachineImageTemplates; | ||
operations: operations.Operations; | ||
} | ||
|
||
export { ImageBuilderClient, models as ImageBuilderModels }; |
86 changes: 86 additions & 0 deletions
86
lib/services/imagebuilderManagement/lib/imageBuilderClient.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
/* jshint latedef:false */ | ||
/* jshint forin:false */ | ||
/* jshint noempty:false */ | ||
|
||
'use strict'; | ||
|
||
const msRest = require('ms-rest'); | ||
const msRestAzure = require('ms-rest-azure'); | ||
const ServiceClient = msRestAzure.AzureServiceClient; | ||
|
||
const models = require('./models'); | ||
const operations = require('./operations'); | ||
|
||
|
||
/** Class representing a ImageBuilderClient. */ | ||
class ImageBuilderClient extends ServiceClient { | ||
/** | ||
* Create a ImageBuilderClient. | ||
* @param {credentials} credentials - Credentials needed for the client to connect to Azure. | ||
* @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call. | ||
* @param {string} [baseUri] - The base URI of the service. | ||
* @param {object} [options] - The parameter options | ||
* @param {Array} [options.filters] - Filters to be added to the request pipeline | ||
* @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] - 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) { | ||
throw new Error('\'credentials\' cannot be null.'); | ||
} | ||
if (subscriptionId === null || subscriptionId === undefined) { | ||
throw new Error('\'subscriptionId\' cannot be null.'); | ||
} | ||
|
||
if (!options) options = {}; | ||
|
||
super(credentials, options); | ||
|
||
this.apiVersion = '2019-02-01-preview'; | ||
this.acceptLanguage = 'en-US'; | ||
this.longRunningOperationRetryTimeout = 30; | ||
this.generateClientRequestId = true; | ||
this.baseUri = baseUri; | ||
if (!this.baseUri) { | ||
this.baseUri = 'https://management.azure.com'; | ||
} | ||
this.credentials = credentials; | ||
this.subscriptionId = subscriptionId; | ||
|
||
let packageInfo = this.getPackageJsonInfo(__dirname); | ||
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); | ||
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { | ||
this.acceptLanguage = options.acceptLanguage; | ||
} | ||
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { | ||
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; | ||
} | ||
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { | ||
this.generateClientRequestId = options.generateClientRequestId; | ||
} | ||
this.virtualMachineImageTemplates = new operations.VirtualMachineImageTemplates(this); | ||
this.operations = new operations.Operations(this); | ||
this.models = models; | ||
msRest.addSerializationMixin(this); | ||
} | ||
|
||
} | ||
|
||
module.exports = ImageBuilderClient; | ||
module.exports['default'] = ImageBuilderClient; | ||
module.exports.ImageBuilderClient = ImageBuilderClient; | ||
module.exports.ImageBuilderModels = models; |
96 changes: 96 additions & 0 deletions
96
lib/services/imagebuilderManagement/lib/models/apiError.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* 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'; | ||
|
||
/** | ||
* Api error. | ||
* | ||
*/ | ||
class ApiError { | ||
/** | ||
* Create a ApiError. | ||
* @property {array} [details] The Api error details | ||
* @property {object} [innerError] The Api inner error | ||
* @property {string} [innerError.exceptionType] The exception type. | ||
* @property {string} [innerError.errorDetail] The internal error message or | ||
* exception dump. | ||
* @property {string} [code] The error code. | ||
* @property {string} [target] The target of the particular error. | ||
* @property {string} [message] The error message. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of ApiError | ||
* | ||
* @returns {object} metadata of ApiError | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'ApiError', | ||
type: { | ||
name: 'Composite', | ||
className: 'ApiError', | ||
modelProperties: { | ||
details: { | ||
required: false, | ||
serializedName: 'details', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'ApiErrorBaseElementType', | ||
type: { | ||
name: 'Composite', | ||
className: 'ApiErrorBase' | ||
} | ||
} | ||
} | ||
}, | ||
innerError: { | ||
required: false, | ||
serializedName: 'innerError', | ||
type: { | ||
name: 'Composite', | ||
className: 'InnerError' | ||
} | ||
}, | ||
code: { | ||
required: false, | ||
serializedName: 'code', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
target: { | ||
required: false, | ||
serializedName: 'target', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
message: { | ||
required: false, | ||
serializedName: 'message', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = ApiError; |
68 changes: 68 additions & 0 deletions
68
lib/services/imagebuilderManagement/lib/models/apiErrorBase.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* 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'; | ||
|
||
/** | ||
* Api error base. | ||
* | ||
*/ | ||
class ApiErrorBase { | ||
/** | ||
* Create a ApiErrorBase. | ||
* @property {string} [code] The error code. | ||
* @property {string} [target] The target of the particular error. | ||
* @property {string} [message] The error message. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of ApiErrorBase | ||
* | ||
* @returns {object} metadata of ApiErrorBase | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'ApiErrorBase', | ||
type: { | ||
name: 'Composite', | ||
className: 'ApiErrorBase', | ||
modelProperties: { | ||
code: { | ||
required: false, | ||
serializedName: 'code', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
target: { | ||
required: false, | ||
serializedName: 'target', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
message: { | ||
required: false, | ||
serializedName: 'message', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = ApiErrorBase; |
Oops, something went wrong.