Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
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
42 changes: 21 additions & 21 deletions lib/services/msiManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
76 changes: 41 additions & 35 deletions lib/services/msiManagement/README.md
Original file line number Diff line number Diff line change
@@ -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 = "<Subscription_Id>";
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 = "<Subscription_Id>";
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)
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down
26 changes: 14 additions & 12 deletions lib/services/msiManagement/lib/models/identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
*/
Expand Down
145 changes: 73 additions & 72 deletions lib/services/msiManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
@@ -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<Operation> {
/**
* @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<Identity> {
/**
* The url to get the next page of results, if any.
*/
nextLink?: string;
}
Loading