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

Commit

Permalink
Merge pull request #2487 from Azure/restapi_auto_applicationinsights/…
Browse files Browse the repository at this point in the history
…resource-manager

[AutoPR] applicationinsights/resource-manager
  • Loading branch information
Dan Schulte authored Mar 28, 2018
2 parents c3c9715 + e41cfd1 commit d4e6d09
Show file tree
Hide file tree
Showing 44 changed files with 11,061 additions and 1,020 deletions.
2 changes: 2 additions & 0 deletions codegen_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"applicationinsights": {
"resource-manager": {
"packageName": "azure-arm-appinsights",
"packageVersion": "1.2.0-preview",
"generateReadmeMd": true,
"dir": "applicationinsights",
"source": "applicationinsights/resource-manager/readme.md"
}
Expand Down
4 changes: 2 additions & 2 deletions lib/services/applicationinsights/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Microsoft
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
Expand All @@ -18,4 +18,4 @@ 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.
SOFTWARE.
47 changes: 22 additions & 25 deletions lib/services/applicationinsights/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
# Microsoft Azure SDK for Node.js - AppLocationInsightsManagement
# Microsoft Azure SDK for Node.js - ApplicationInsightsManagementClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features

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

## How to Install

```bash
npm install azure-arm-appinsights
```

## How to Use

### Authentication, client creation and listing components as an example

```javascript
var msRestAzure = require('ms-rest-azure');
var appInsights = require("azure-arm-appinsights");

// 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(function(err, credentials) {
let client = new appInsights(credentials, 'your-subscription-id');
client.components.list().then((operations) => {
console.log('List of components:');
console.dir(components, {depth: null, colors: true});
});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
## How to use

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

```javascript
const msRestAzure = require("ms-rest-azure");
const ApplicationInsightsManagementClient = require("azure-arm-appinsights");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new ApplicationInsightsManagementClient(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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

import { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

declare class ApplicationInsightsManagementClient extends AzureServiceClient {
export default class ApplicationInsightsManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the ApplicationInsightsManagementClient class.
* @constructor
Expand Down Expand Up @@ -56,12 +57,20 @@ declare class ApplicationInsightsManagementClient extends AzureServiceClient {

// Operation groups
operations: operations.Operations;
components: operations.Components;
webTests: operations.WebTests;
annotations: operations.Annotations;
aPIKeys: operations.APIKeys;
exportConfigurations: operations.ExportConfigurations;
componentCurrentBillingFeatures: operations.ComponentCurrentBillingFeatures;
componentQuotaStatus: operations.ComponentQuotaStatus;
aPIKeys: operations.APIKeys;
componentFeatureCapabilities: operations.ComponentFeatureCapabilities;
componentAvailableFeatures: operations.ComponentAvailableFeatures;
proactiveDetectionConfigurations: operations.ProactiveDetectionConfigurations;
components: operations.Components;
workItemConfigurations: operations.WorkItemConfigurations;
favorites: operations.Favorites;
favorite: operations.Favorite;
webTestLocations: operations.WebTestLocations;
webTests: operations.WebTests;
}

export = ApplicationInsightsManagementClient;
export { ApplicationInsightsManagementClient, models as ApplicationInsightsManagementModels };
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,27 @@ class ApplicationInsightsManagementClient extends ServiceClient {
this.generateClientRequestId = options.generateClientRequestId;
}
this.operations = new operations.Operations(this);
this.components = new operations.Components(this);
this.webTests = new operations.WebTests(this);
this.annotations = new operations.Annotations(this);
this.aPIKeys = new operations.APIKeys(this);
this.exportConfigurations = new operations.ExportConfigurations(this);
this.componentCurrentBillingFeatures = new operations.ComponentCurrentBillingFeatures(this);
this.componentQuotaStatus = new operations.ComponentQuotaStatus(this);
this.aPIKeys = new operations.APIKeys(this);
this.componentFeatureCapabilities = new operations.ComponentFeatureCapabilities(this);
this.componentAvailableFeatures = new operations.ComponentAvailableFeatures(this);
this.proactiveDetectionConfigurations = new operations.ProactiveDetectionConfigurations(this);
this.components = new operations.Components(this);
this.workItemConfigurations = new operations.WorkItemConfigurations(this);
this.favorites = new operations.Favorites(this);
this.favorite = new operations.Favorite(this);
this.webTestLocations = new operations.WebTestLocations(this);
this.webTests = new operations.WebTests(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = ApplicationInsightsManagementClient;
module.exports['default'] = ApplicationInsightsManagementClient;
module.exports.ApplicationInsightsManagementClient = ApplicationInsightsManagementClient;
module.exports.ApplicationInsightsManagementModels = models;
95 changes: 95 additions & 0 deletions lib/services/applicationinsights/lib/models/annotation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* 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';

/**
* Annotation associated with an application insights resource.
*
*/
class Annotation {
/**
* Create a Annotation.
* @member {string} [annotationName] Name of annotation
* @member {string} [category] Category of annotation, free form
* @member {date} [eventTime] Time when event occurred
* @member {string} [id] Unique Id for annotation
* @member {string} [properties] Serialized JSON object for detailed
* properties
* @member {string} [relatedAnnotation] Related parent annotation if any.
* Default value: 'null' .
*/
constructor() {
}

/**
* Defines the metadata of Annotation
*
* @returns {object} metadata of Annotation
*
*/
mapper() {
return {
required: false,
serializedName: 'Annotation',
type: {
name: 'Composite',
className: 'Annotation',
modelProperties: {
annotationName: {
required: false,
serializedName: 'AnnotationName',
type: {
name: 'String'
}
},
category: {
required: false,
serializedName: 'Category',
type: {
name: 'String'
}
},
eventTime: {
required: false,
serializedName: 'EventTime',
type: {
name: 'DateTime'
}
},
id: {
required: false,
serializedName: 'Id',
type: {
name: 'String'
}
},
properties: {
required: false,
serializedName: 'Properties',
type: {
name: 'String'
}
},
relatedAnnotation: {
required: false,
serializedName: 'RelatedAnnotation',
defaultValue: 'null',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = Annotation;
74 changes: 74 additions & 0 deletions lib/services/applicationinsights/lib/models/annotationError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* 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';

const models = require('./index');

/**
* Error associated with trying to create annotation with Id that already exist
*
*/
class AnnotationError {
/**
* Create a AnnotationError.
* @member {string} [code] Error detail code and explanation
* @member {string} [message] Error message
* @member {object} [innererror]
* @member {string} [innererror.diagnosticcontext] Provides correlation for
* request
* @member {date} [innererror.time] Request time
*/
constructor() {
}

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

module.exports = AnnotationError;
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.
*/

'use strict';

const models = require('./index');

/**
* An Application Insights component available features.
*
*/
class ApplicationInsightsComponentAvailableFeatures {
/**
* Create a ApplicationInsightsComponentAvailableFeatures.
* @member {array} [result] A list of Application Insigths component feature.
*/
constructor() {
}

/**
* Defines the metadata of ApplicationInsightsComponentAvailableFeatures
*
* @returns {object} metadata of ApplicationInsightsComponentAvailableFeatures
*
*/
mapper() {
return {
required: false,
serializedName: 'ApplicationInsightsComponentAvailableFeatures',
type: {
name: 'Composite',
className: 'ApplicationInsightsComponentAvailableFeatures',
modelProperties: {
result: {
required: false,
readOnly: true,
serializedName: 'Result',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ApplicationInsightsComponentFeatureElementType',
type: {
name: 'Composite',
className: 'ApplicationInsightsComponentFeature'
}
}
}
}
}
}
};
}
}

module.exports = ApplicationInsightsComponentAvailableFeatures;
Loading

0 comments on commit d4e6d09

Please sign in to comment.