diff --git a/lib/services/msiManagement/LICENSE.txt b/lib/services/msiManagement/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/msiManagement/LICENSE.txt +++ b/lib/services/msiManagement/LICENSE.txt @@ -1,21 +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. +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. diff --git a/lib/services/msiManagement/README.md b/lib/services/msiManagement/README.md index 4166e0741f..508d5597e0 100644 --- a/lib/services/msiManagement/README.md +++ b/lib/services/msiManagement/README.md @@ -1,35 +1,41 @@ -# Microsoft Azure SDK for Node.js - ManagedServiceIdentityClient -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-msi -``` - -## How to use - -### Authentication, client creation and list operations as an example. - -```javascript -const msRestAzure = require("ms-rest-azure"); -const ManagedServiceIdentityClient = require("azure-arm-msi"); -msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new ManagedServiceIdentityClient(creds, subscriptionId); - return client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).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-msi +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 - ManagedServiceIdentityClient +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-msi +``` + +### How to use + +#### Authentication, client creation and list operations as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const ManagedServiceIdentityClient = require("azure-arm-msi"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new ManagedServiceIdentityClient(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) diff --git a/lib/services/msiManagement/lib/managedServiceIdentityClient.d.ts b/lib/services/msiManagement/lib/managedServiceIdentityClient.d.ts index a1ed89beb5..97b0cb5cf2 100644 --- a/lib/services/msiManagement/lib/managedServiceIdentityClient.d.ts +++ b/lib/services/msiManagement/lib/managedServiceIdentityClient.d.ts @@ -34,11 +34,11 @@ export default class ManagedServiceIdentityClient 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); diff --git a/lib/services/msiManagement/lib/managedServiceIdentityClient.js b/lib/services/msiManagement/lib/managedServiceIdentityClient.js index f3b83b09ef..2c10fe8c22 100644 --- a/lib/services/msiManagement/lib/managedServiceIdentityClient.js +++ b/lib/services/msiManagement/lib/managedServiceIdentityClient.js @@ -34,9 +34,9 @@ class ManagedServiceIdentityClient 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) { @@ -50,7 +50,7 @@ class ManagedServiceIdentityClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2015-08-31-preview'; + this.apiVersion = '2018-11-30'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; diff --git a/lib/services/msiManagement/lib/models/identity.js b/lib/services/msiManagement/lib/models/identity.js index 59c9c370ec..90d1fd0ad2 100644 --- a/lib/services/msiManagement/lib/models/identity.js +++ b/lib/services/msiManagement/lib/models/identity.js @@ -20,19 +20,21 @@ const models = require('./index'); class Identity extends models['BaseResource'] { /** * Create a Identity. - * @member {string} [id] The id of the created identity. - * @member {string} [name] The name of the created identity. - * @member {string} [location] The Azure region where the identity lives. - * @member {object} [tags] Resource tags - * @member {uuid} [tenantId] The id of the tenant which the identity belongs - * to. - * @member {uuid} [principalId] The id of the service principal object + * @property {string} [id] The id of the created identity. + * @property {string} [name] The name of the created identity. + * @property {string} [location] The Azure region where the identity lives. + * @property {object} [tags] Resource tags + * @property {uuid} [tenantId] The id of the tenant which the identity + * belongs to. + * @property {uuid} [principalId] The id of the service principal object * associated with the created identity. - * @member {uuid} [clientId] The id of the app associated with the identity. - * This is a random generated UUID by MSI. - * @member {string} [clientSecretUrl] The ManagedServiceIdentity DataPlane - * URL that can be queried to obtain the identity credentials. - * @member {string} [type] The type of resource i.e. + * @property {uuid} [clientId] The id of the app associated with the + * identity. This is a random generated UUID by MSI. + * @property {string} [clientSecretUrl] The ManagedServiceIdentity DataPlane + * URL that can be queried to obtain the identity credentials. If identity is + * user assigned, then the clientSecretUrl will not be present in the + * response, otherwise it will be present. + * @property {string} [type] The type of resource i.e. * Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include: * 'Microsoft.ManagedIdentity/userAssignedIdentities' */ diff --git a/lib/services/msiManagement/lib/models/index.d.ts b/lib/services/msiManagement/lib/models/index.d.ts index 2e2b855082..0b12dac3c1 100644 --- a/lib/services/msiManagement/lib/models/index.d.ts +++ b/lib/services/msiManagement/lib/models/index.d.ts @@ -1,127 +1,128 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the Identity class. - * @constructor * Describes an identity resource. - * - * @member {string} [id] The id of the created identity. - * @member {string} [name] The name of the created identity. - * @member {string} [location] The Azure region where the identity lives. - * @member {object} [tags] Resource tags - * @member {uuid} [tenantId] The id of the tenant which the identity belongs - * to. - * @member {uuid} [principalId] The id of the service principal object - * associated with the created identity. - * @member {uuid} [clientId] The id of the app associated with the identity. - * This is a random generated UUID by MSI. - * @member {string} [clientSecretUrl] The ManagedServiceIdentity DataPlane URL - * that can be queried to obtain the identity credentials. - * @member {string} [type] The type of resource i.e. - * Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include: - * 'Microsoft.ManagedIdentity/userAssignedIdentities' */ export interface Identity extends BaseResource { + /** + * The id of the created identity. + */ readonly id?: string; + /** + * The name of the created identity. + */ readonly name?: string; + /** + * The Azure region where the identity lives. + */ location?: string; + /** + * Resource tags + */ tags?: { [propertyName: string]: string }; + /** + * The id of the tenant which the identity belongs to. + */ readonly tenantId?: string; + /** + * The id of the service principal object associated with the created identity. + */ readonly principalId?: string; + /** + * The id of the app associated with the identity. This is a random generated UUID by MSI. + */ readonly clientId?: string; + /** + * The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity + * credentials. If identity is user assigned, then the clientSecretUrl will not be present in the + * response, otherwise it will be present. + */ readonly clientSecretUrl?: string; + /** + * The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities. Possible values + * include: 'Microsoft.ManagedIdentity/userAssignedIdentities' + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * @summary Operation Display. - * - * The object that describes the operation. - * - * @member {string} [provider] Resource Provider Name. Friendly name of the - * resource provider. - * @member {string} [operation] Operation Type. The type of operation. For - * example: read, write, delete. - * @member {string} [resource] Resource Type. The resource type on which the - * operation is performed. - * @member {string} [description] Operation description. A description of the - * operation. + * @description The object that describes the operation. */ export interface OperationDisplay { + /** + * @summary Resource Provider Name. + * @description Friendly name of the resource provider. + */ provider?: string; + /** + * @summary Operation Type. + * @description The type of operation. For example: read, write, delete. + */ operation?: string; + /** + * @summary Resource Type. + * @description The resource type on which the operation is performed. + */ resource?: string; + /** + * @summary Operation description + * @description A description of the operation. + */ description?: string; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * @summary Microsoft.ManagedIdentity Operation. - * - * Operation supported by the Microsoft.ManagedIdentity REST API. - * - * @member {string} [name] Operation Name. The name of the REST Operation. This - * is of the format {provider}/{resource}/{operation}. - * @member {object} [display] Operation Display. The object that describes the - * operation. - * @member {string} [display.provider] Friendly name of the resource provider. - * @member {string} [display.operation] The type of operation. For example: - * read, write, delete. - * @member {string} [display.resource] The resource type on which the operation - * is performed. - * @member {string} [display.description] A description of the operation. + * @description Operation supported by the Microsoft.ManagedIdentity REST API. */ export interface Operation { + /** + * @summary Operation Name. + * @description The name of the REST Operation. This is of the format + * {provider}/{resource}/{operation}. + */ name?: string; + /** + * @summary Operation Display. + * @description The object that describes the operation. + */ display?: OperationDisplay; } - /** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor * @summary Operations List. - * - * A list of operations supported by Microsoft.ManagedIdentity Resource - * Provider. - * - * @member {string} [nextLink] The url to get the next page of results, if any. + * @description A list of operations supported by Microsoft.ManagedIdentity Resource Provider. */ export interface OperationListResult extends Array { + /** + * @summary Next Link + * @description The url to get the next page of results, if any. + */ nextLink?: string; } /** - * @class - * Initializes a new instance of the UserAssignedIdentitiesListResult class. - * @constructor * Values returned by the List operation. - * - * @member {string} [nextLink] The url to get the next page of results, if any. */ export interface UserAssignedIdentitiesListResult extends Array { + /** + * The url to get the next page of results, if any. + */ nextLink?: string; } diff --git a/lib/services/msiManagement/lib/models/operation.js b/lib/services/msiManagement/lib/models/operation.js index 206df1e7c3..c2d3ef27d6 100644 --- a/lib/services/msiManagement/lib/models/operation.js +++ b/lib/services/msiManagement/lib/models/operation.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * @summary Microsoft.ManagedIdentity Operation. * @@ -21,17 +19,17 @@ const models = require('./index'); class Operation { /** * Create a Operation. - * @member {string} [name] Operation Name. The name of the REST Operation. + * @property {string} [name] Operation Name. The name of the REST Operation. * This is of the format {provider}/{resource}/{operation}. - * @member {object} [display] Operation Display. The object that describes + * @property {object} [display] Operation Display. The object that describes * the operation. - * @member {string} [display.provider] Friendly name of the resource + * @property {string} [display.provider] Friendly name of the resource * provider. - * @member {string} [display.operation] The type of operation. For example: + * @property {string} [display.operation] The type of operation. For example: * read, write, delete. - * @member {string} [display.resource] The resource type on which the + * @property {string} [display.resource] The resource type on which the * operation is performed. - * @member {string} [display.description] A description of the operation. + * @property {string} [display.description] A description of the operation. */ constructor() { } diff --git a/lib/services/msiManagement/lib/models/operationDisplay.js b/lib/services/msiManagement/lib/models/operationDisplay.js index f8013e60ab..15bab5e8dd 100644 --- a/lib/services/msiManagement/lib/models/operationDisplay.js +++ b/lib/services/msiManagement/lib/models/operationDisplay.js @@ -19,14 +19,14 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] Resource Provider Name. Friendly name of the + * @property {string} [provider] Resource Provider Name. Friendly name of the * resource provider. - * @member {string} [operation] Operation Type. The type of operation. For + * @property {string} [operation] Operation Type. The type of operation. For * example: read, write, delete. - * @member {string} [resource] Resource Type. The resource type on which the - * operation is performed. - * @member {string} [description] Operation description. A description of the - * operation. + * @property {string} [resource] Resource Type. The resource type on which + * the operation is performed. + * @property {string} [description] Operation description. A description of + * the operation. */ constructor() { } diff --git a/lib/services/msiManagement/lib/models/operationListResult.js b/lib/services/msiManagement/lib/models/operationListResult.js index 06d96cebb8..d7ef6bfaae 100644 --- a/lib/services/msiManagement/lib/models/operationListResult.js +++ b/lib/services/msiManagement/lib/models/operationListResult.js @@ -18,7 +18,7 @@ class OperationListResult extends Array { /** * Create a OperationListResult. - * @member {string} [nextLink] The url to get the next page of results, if + * @property {string} [nextLink] The url to get the next page of results, if * any. */ constructor() { diff --git a/lib/services/msiManagement/lib/models/userAssignedIdentitiesListResult.js b/lib/services/msiManagement/lib/models/userAssignedIdentitiesListResult.js index 8e071470ca..4be9cc6e01 100644 --- a/lib/services/msiManagement/lib/models/userAssignedIdentitiesListResult.js +++ b/lib/services/msiManagement/lib/models/userAssignedIdentitiesListResult.js @@ -16,7 +16,7 @@ class UserAssignedIdentitiesListResult extends Array { /** * Create a UserAssignedIdentitiesListResult. - * @member {string} [nextLink] The url to get the next page of results, if + * @property {string} [nextLink] The url to get the next page of results, if * any. */ constructor() { diff --git a/lib/services/msiManagement/package.json b/lib/services/msiManagement/package.json index 252b9ff740..53f0ae0716 100644 --- a/lib/services/msiManagement/package.json +++ b/lib/services/msiManagement/package.json @@ -14,12 +14,12 @@ "license": "MIT", "main": "./lib/managedServiceIdentityClient.js", "types": "./lib/managedServiceIdentityClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/msiManagement", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}