Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR apimanagement/resource-manager] API Management service SKU API documentation #499

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions packages/@azure/applicationinsights-query/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#git
.git
.gitignore
#gulp
gulpfile.js
#documentation
doc/
docs/
#dependencies
node_modules/
#samples
sample/
samples/
#tests
test/
tests/
coverage/
#tools and scripts
tools/
scripts/
#IDE settings
*.sln
.vscode/
.idea
.editorconfig
.ntvs_analysis.*
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
appveyor.yml
# Nuget packages #
.nuget/
packages/
packages.config
59 changes: 21 additions & 38 deletions packages/@azure/applicationinsights-query/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
## An isomorphic javascript sdk for - ApplicationInsightsDataClient
# An isomorphic javascript sdk for - ApplicationInsightsDataClient
This project provides an isomorphic javascript package. Right now it supports:
- node.js version 6.x.x or higher
- browser javascript

This package contains an isomorphic SDK for ApplicationInsightsDataClient.

### Currently supported environments

- Node.js version 6.x.x or higher
- Browser JavaScript

### How to Install
## How to Install

- nodejs
```
npm install @azure/applicationinsights-query
```

### How to use

#### nodejs - Authentication, client creation and get metrics as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

```
npm install @azure/ms-rest-nodeauth
- browser
```html
<script type="text/javascript" src="@azure/applicationinsights-query/dist/applicationinsights-query.js"></script>
```

##### Sample code
## How to use

### nodejs - Authentication, client creation and get metrics as an example written in TypeScript.

```ts
import * as msRest from "@azure/ms-rest-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import * as msRest from "ms-rest-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import { ApplicationInsightsDataClient, ApplicationInsightsDataModels, ApplicationInsightsDataMappers } from "@azure/applicationinsights-query";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

Expand All @@ -51,26 +44,16 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and get metrics as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

```
npm install @azure/ms-rest-browserauth
```

##### Sample code

See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
### browser - Authentication, client creation and get metrics as an example written in javascript.

- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/applicationinsights-query sample</title>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/applicationinsights-query/dist/applicationinsights-query.js"></script>
<script type="text/javascript">
const subscriptionId = "<Subscription_Id>";
Expand Down Expand Up @@ -103,10 +86,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
});
</script>
</head>
<body></body>
<body>
</body>
</html>
```

## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as msRest from "ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as operations from "./operations";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as msRest from "ms-rest-js";
import * as Models from "./models";

const packageName = "@azure/applicationinsights-query";
const packageVersion = "0.1.0";
const packageVersion = "1.0.0-preview";

export class ApplicationInsightsDataClientContext extends msRest.ServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand All @@ -30,16 +30,13 @@ export class ApplicationInsightsDataClientContext extends msRest.ServiceClient {
if (!options) {
options = {};
}
if(!options.userAgent) {
const defaultUserAgent = msRest.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.baseUri = options.baseUri || this.baseUri || "https://api.applicationinsights.io";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;

this.addUserAgentInfo(`${packageName}/${packageVersion}`);
}
}
140 changes: 117 additions & 23 deletions packages/@azure/applicationinsights-query/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import { ServiceClientOptions } from "@azure/ms-rest-js";
import * as msRest from "@azure/ms-rest-js";
import { ServiceClientOptions } from "ms-rest-js";
import * as msRest from "ms-rest-js";


/**
Expand Down Expand Up @@ -1920,51 +1920,145 @@ export interface EventsGetOptionalParams extends msRest.RequestOptionsBase {

/**
* Defines values for MetricId.
* Possible values include: 'requests/count', 'requests/duration', 'requests/failed',
* 'users/count', 'users/authenticated', 'pageViews/count', 'pageViews/duration',
* 'client/processingDuration', 'client/receiveDuration', 'client/networkDuration',
* 'client/sendDuration', 'client/totalDuration', 'dependencies/count', 'dependencies/failed',
* 'dependencies/duration', 'exceptions/count', 'exceptions/browser', 'exceptions/server',
* Possible values include: 'requests/count', 'requests/duration',
* 'requests/failed', 'users/count', 'users/authenticated', 'pageViews/count',
* 'pageViews/duration', 'client/processingDuration', 'client/receiveDuration',
* 'client/networkDuration', 'client/sendDuration', 'client/totalDuration',
* 'dependencies/count', 'dependencies/failed', 'dependencies/duration',
* 'exceptions/count', 'exceptions/browser', 'exceptions/server',
* 'sessions/count', 'performanceCounters/requestExecutionTime',
* 'performanceCounters/requestsPerSecond', 'performanceCounters/requestsInQueue',
* 'performanceCounters/memoryAvailableBytes', 'performanceCounters/exceptionsPerSecond',
* 'performanceCounters/processCpuPercentage', 'performanceCounters/processIOBytesPerSecond',
* 'performanceCounters/processPrivateBytes', 'performanceCounters/processorCpuPercentage',
* 'availabilityResults/availabilityPercentage', 'availabilityResults/duration',
* 'billing/telemetryCount', 'customEvents/count'
* 'performanceCounters/requestsPerSecond',
* 'performanceCounters/requestsInQueue',
* 'performanceCounters/memoryAvailableBytes',
* 'performanceCounters/exceptionsPerSecond',
* 'performanceCounters/processCpuPercentage',
* 'performanceCounters/processIOBytesPerSecond',
* 'performanceCounters/processPrivateBytes',
* 'performanceCounters/processorCpuPercentage',
* 'availabilityResults/availabilityPercentage',
* 'availabilityResults/duration', 'billing/telemetryCount',
* 'customEvents/count'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MetricId = <MetricId>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
export type MetricId = 'requests/count' | 'requests/duration' | 'requests/failed' | 'users/count' | 'users/authenticated' | 'pageViews/count' | 'pageViews/duration' | 'client/processingDuration' | 'client/receiveDuration' | 'client/networkDuration' | 'client/sendDuration' | 'client/totalDuration' | 'dependencies/count' | 'dependencies/failed' | 'dependencies/duration' | 'exceptions/count' | 'exceptions/browser' | 'exceptions/server' | 'sessions/count' | 'performanceCounters/requestExecutionTime' | 'performanceCounters/requestsPerSecond' | 'performanceCounters/requestsInQueue' | 'performanceCounters/memoryAvailableBytes' | 'performanceCounters/exceptionsPerSecond' | 'performanceCounters/processCpuPercentage' | 'performanceCounters/processIOBytesPerSecond' | 'performanceCounters/processPrivateBytes' | 'performanceCounters/processorCpuPercentage' | 'availabilityResults/availabilityPercentage' | 'availabilityResults/duration' | 'billing/telemetryCount' | 'customEvents/count';
export enum MetricId {
Requestscount = 'requests/count',
Requestsduration = 'requests/duration',
Requestsfailed = 'requests/failed',
Userscount = 'users/count',
Usersauthenticated = 'users/authenticated',
PageViewscount = 'pageViews/count',
PageViewsduration = 'pageViews/duration',
ClientprocessingDuration = 'client/processingDuration',
ClientreceiveDuration = 'client/receiveDuration',
ClientnetworkDuration = 'client/networkDuration',
ClientsendDuration = 'client/sendDuration',
ClienttotalDuration = 'client/totalDuration',
Dependenciescount = 'dependencies/count',
Dependenciesfailed = 'dependencies/failed',
Dependenciesduration = 'dependencies/duration',
Exceptionscount = 'exceptions/count',
Exceptionsbrowser = 'exceptions/browser',
Exceptionsserver = 'exceptions/server',
Sessionscount = 'sessions/count',
PerformanceCountersrequestExecutionTime = 'performanceCounters/requestExecutionTime',
PerformanceCountersrequestsPerSecond = 'performanceCounters/requestsPerSecond',
PerformanceCountersrequestsInQueue = 'performanceCounters/requestsInQueue',
PerformanceCountersmemoryAvailableBytes = 'performanceCounters/memoryAvailableBytes',
PerformanceCountersexceptionsPerSecond = 'performanceCounters/exceptionsPerSecond',
PerformanceCountersprocessCpuPercentage = 'performanceCounters/processCpuPercentage',
PerformanceCountersprocessIOBytesPerSecond = 'performanceCounters/processIOBytesPerSecond',
PerformanceCountersprocessPrivateBytes = 'performanceCounters/processPrivateBytes',
PerformanceCountersprocessorCpuPercentage = 'performanceCounters/processorCpuPercentage',
AvailabilityResultsavailabilityPercentage = 'availabilityResults/availabilityPercentage',
AvailabilityResultsduration = 'availabilityResults/duration',
BillingtelemetryCount = 'billing/telemetryCount',
CustomEventscount = 'customEvents/count',
}

/**
* Defines values for MetricsAggregation.
* Possible values include: 'min', 'max', 'avg', 'sum', 'count', 'unique'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MetricsAggregation =
* <MetricsAggregation>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
export type MetricsAggregation = 'min' | 'max' | 'avg' | 'sum' | 'count' | 'unique';
export enum MetricsAggregation {
Min = 'min',
Max = 'max',
Avg = 'avg',
Sum = 'sum',
Count = 'count',
Unique = 'unique',
}

/**
* Defines values for MetricsSegment.
* Possible values include: 'applicationBuild', 'applicationVersion',
* 'authenticatedOrAnonymousTraffic', 'browser', 'browserVersion', 'city', 'cloudRoleName',
* 'cloudServiceName', 'continent', 'countryOrRegion', 'deploymentId', 'deploymentUnit',
* 'deviceType', 'environment', 'hostingLocation', 'instanceName'
* 'authenticatedOrAnonymousTraffic', 'browser', 'browserVersion', 'city',
* 'cloudRoleName', 'cloudServiceName', 'continent', 'countryOrRegion',
* 'deploymentId', 'deploymentUnit', 'deviceType', 'environment',
* 'hostingLocation', 'instanceName'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MetricsSegment =
* <MetricsSegment>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
export type MetricsSegment = 'applicationBuild' | 'applicationVersion' | 'authenticatedOrAnonymousTraffic' | 'browser' | 'browserVersion' | 'city' | 'cloudRoleName' | 'cloudServiceName' | 'continent' | 'countryOrRegion' | 'deploymentId' | 'deploymentUnit' | 'deviceType' | 'environment' | 'hostingLocation' | 'instanceName';
export enum MetricsSegment {
ApplicationBuild = 'applicationBuild',
ApplicationVersion = 'applicationVersion',
AuthenticatedOrAnonymousTraffic = 'authenticatedOrAnonymousTraffic',
Browser = 'browser',
BrowserVersion = 'browserVersion',
City = 'city',
CloudRoleName = 'cloudRoleName',
CloudServiceName = 'cloudServiceName',
Continent = 'continent',
CountryOrRegion = 'countryOrRegion',
DeploymentId = 'deploymentId',
DeploymentUnit = 'deploymentUnit',
DeviceType = 'deviceType',
Environment = 'environment',
HostingLocation = 'hostingLocation',
InstanceName = 'instanceName',
}

/**
* Defines values for EventType.
* Possible values include: '$all', 'traces', 'customEvents', 'pageViews', 'browserTimings',
* 'requests', 'dependencies', 'exceptions', 'availabilityResults', 'performanceCounters',
* 'customMetrics'
* Possible values include: '$all', 'traces', 'customEvents', 'pageViews',
* 'browserTimings', 'requests', 'dependencies', 'exceptions',
* 'availabilityResults', 'performanceCounters', 'customMetrics'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: EventType = <EventType>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
export type EventType = '$all' | 'traces' | 'customEvents' | 'pageViews' | 'browserTimings' | 'requests' | 'dependencies' | 'exceptions' | 'availabilityResults' | 'performanceCounters' | 'customMetrics';
export enum EventType {
All = '$all',
Traces = 'traces',
CustomEvents = 'customEvents',
PageViews = 'pageViews',
BrowserTimings = 'browserTimings',
Requests = 'requests',
Dependencies = 'dependencies',
Exceptions = 'exceptions',
AvailabilityResults = 'availabilityResults',
PerformanceCounters = 'performanceCounters',
CustomMetrics = 'customMetrics',
}

/**
* Contains response data for the get operation.
Expand Down
12 changes: 11 additions & 1 deletion packages/@azure/applicationinsights-query/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as msRest from "ms-rest-js";


export const MetricsPostBodySchemaParameters: msRest.CompositeMapper = {
Expand Down Expand Up @@ -729,6 +729,11 @@ export const EventsResults: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "type",
clientName: "type"
},
uberParent: "EventsResultData",
className: "EventsResultData"
}
}
Expand Down Expand Up @@ -760,6 +765,11 @@ export const EventsResult: msRest.CompositeMapper = {
serializedName: "value",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "type",
clientName: "type"
},
uberParent: "EventsResultData",
className: "EventsResultData"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as msRest from "ms-rest-js";

export const aggregation: msRest.OperationQueryParameter = {
parameterPath: [
Expand Down
Loading