Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lib/services/securityInsightManagement/LICENSE.txt
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.
43 changes: 43 additions & 0 deletions lib/services/securityInsightManagement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
uid: azure-arm-securityinsight
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 - SecurityInsights

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-securityinsight
```

### How to use

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

```javascript
const msRestAzure = require("ms-rest-azure");
const SecurityInsights = require("azure-arm-securityinsight");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new SecurityInsights(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)
93 changes: 93 additions & 0 deletions lib/services/securityInsightManagement/lib/models/alertRule.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* 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';

/**
* Alert rule.
*
*/
class AlertRule {
/**
* Create a AlertRule.
* @property {string} [id] Azure resource Id
* @property {string} [type] Azure resource type
* @property {string} [name] Azure resource name
* @property {string} [etag] Etag of the alert rule.
* @property {string} kind Polymorphic Discriminator
*/
constructor() {
}

/**
* Defines the metadata of AlertRule
*
* @returns {object} metadata of AlertRule
*
*/
mapper() {
return {
required: false,
serializedName: 'AlertRule',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'kind',
clientName: 'kind'
},
uberParent: 'AlertRule',
className: 'AlertRule',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
etag: {
required: false,
serializedName: 'etag',
type: {
name: 'String'
}
},
kind: {
required: true,
serializedName: 'kind',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AlertRule;
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* 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';

/**
* Describes an Azure resource with kind.
*
*/
class AlertRuleKind1 {
/**
* Create a AlertRuleKind1.
* @property {string} [kind] The kind of the alert rule. Possible values
* include: 'Scheduled'
*/
constructor() {
}

/**
* Defines the metadata of AlertRuleKind1
*
* @returns {object} metadata of AlertRuleKind1
*
*/
mapper() {
return {
required: false,
serializedName: 'AlertRuleKind',
type: {
name: 'Composite',
className: 'AlertRuleKind1',
modelProperties: {
kind: {
required: false,
serializedName: 'kind',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AlertRuleKind1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* 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';

/**
* List all the alert rules.
*/
class AlertRulesList extends Array {
/**
* Create a AlertRulesList.
* @property {string} [nextLink] URL to fetch the next set of alert rules.
*/
constructor() {
super();
}

/**
* Defines the metadata of AlertRulesList
*
* @returns {object} metadata of AlertRulesList
*
*/
mapper() {
return {
required: false,
serializedName: 'AlertRulesList',
type: {
name: 'Composite',
className: 'AlertRulesList',
modelProperties: {
nextLink: {
required: false,
readOnly: true,
serializedName: 'nextLink',
type: {
name: 'String'
}
},
value: {
required: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AlertRuleElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'kind',
clientName: 'kind'
},
uberParent: 'AlertRule',
className: 'AlertRule'
}
}
}
}
}
}
};
}
}

module.exports = AlertRulesList;
Loading