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

[AutoPR] security/resource-manager #5044

Closed
wants to merge 2 commits into from
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
2 changes: 1 addition & 1 deletion lib/services/securityManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
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
Expand Down
34 changes: 18 additions & 16 deletions lib/services/securityManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,43 @@ uid: azure-arm-security
summary: *content

---
# Microsoft Azure SDK for Node.js - SecurityCenter
**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 - SecurityCenter

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

## Features
### Features


## How to Install
### How to Install

```bash
npm install azure-arm-security
```

## How to use
### How to use

### Authentication, client creation and list pricings as an example.
#### Authentication, client creation, and list regulatoryComplianceStandards as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const SecurityCenter = require("azure-arm-security");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new SecurityCenter(creds, subscriptionId);
return client.pricings.list().then((result) => {
console.log("The result is:");
console.log(result);
});
const subscriptionId = "<Subscription_Id>";
const client = new SecurityCenter(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const filter = "testfilter";

return client.regulatoryComplianceStandards.list(resourceGroupName, filter).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
```
### Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-node%2Flib%2Fservices%2FsecurityManagement%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class AadConnectivityState1 {
/**
* Create a AadConnectivityState1.
* @member {string} [connectivityState] The connectivity state of the
* @property {string} [connectivityState] The connectivity state of the
* external AAD solution . Possible values include: 'Discovered',
* 'NotLicensed', 'Connected'
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const models = require('./index');
class AadExternalSecuritySolution extends models['ExternalSecuritySolution'] {
/**
* Create a AadExternalSecuritySolution.
* @member {object} [properties]
* @member {string} [properties.deviceVendor]
* @member {string} [properties.deviceType]
* @member {object} [properties.workspace]
* @member {string} [properties.workspace.id] Azure resource ID of the
* @property {object} [properties]
* @property {string} [properties.deviceVendor]
* @property {string} [properties.deviceType]
* @property {object} [properties.workspace]
* @property {string} [properties.workspace.id] Azure resource ID of the
* connected OMS workspace
* @member {string} [properties.connectivityState] Possible values include:
* @property {string} [properties.connectivityState] Possible values include:
* 'Discovered', 'NotLicensed', 'Connected'
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
class AadSolutionProperties {
/**
* Create a AadSolutionProperties.
* @member {string} [deviceVendor]
* @member {string} [deviceType]
* @member {object} [workspace]
* @member {string} [workspace.id] Azure resource ID of the connected OMS
* @property {string} [deviceVendor]
* @property {string} [deviceType]
* @property {object} [workspace]
* @property {string} [workspace.id] Azure resource ID of the connected OMS
* workspace
* @member {string} [connectivityState] The connectivity state of the
* @property {string} [connectivityState] The connectivity state of the
* external AAD solution . Possible values include: 'Discovered',
* 'NotLicensed', 'Connected'
*/
Expand Down
116 changes: 116 additions & 0 deletions lib/services/securityManagement/lib/models/adaptiveNetworkHardening.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
* 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');

/**
* The resource whose properties describes the Adaptive Network Hardening
* settings for some Azure resource
*
* @extends models['Resource']
*/
class AdaptiveNetworkHardening extends models['Resource'] {
/**
* Create a AdaptiveNetworkHardening.
* @property {array} [rules] The security rules which are recommended to be
* effective on the VM
* @property {date} [rulesCalculationTime] The UTC time on which the rules
* were calculated
* @property {array} [effectiveNetworkSecurityGroups] The Network Security
* Groups effective on the network interfaces of the protected resource
*/
constructor() {
super();
}

/**
* Defines the metadata of AdaptiveNetworkHardening
*
* @returns {object} metadata of AdaptiveNetworkHardening
*
*/
mapper() {
return {
required: false,
serializedName: 'AdaptiveNetworkHardening',
type: {
name: 'Composite',
className: 'AdaptiveNetworkHardening',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
rules: {
required: false,
serializedName: 'properties.rules',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'RuleElementType',
type: {
name: 'Composite',
className: 'Rule'
}
}
}
},
rulesCalculationTime: {
required: false,
serializedName: 'properties.rulesCalculationTime',
type: {
name: 'DateTime'
}
},
effectiveNetworkSecurityGroups: {
required: false,
serializedName: 'properties.effectiveNetworkSecurityGroups',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'EffectiveNetworkSecurityGroupsElementType',
type: {
name: 'Composite',
className: 'EffectiveNetworkSecurityGroups'
}
}
}
}
}
}
};
}
}

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

/**
* Class representing a AdaptiveNetworkHardeningEnforceRequest.
*/
class AdaptiveNetworkHardeningEnforceRequest {
/**
* Create a AdaptiveNetworkHardeningEnforceRequest.
* @property {array} rules The rules to enforce
* @property {array} networkSecurityGroups The Azure resource IDs of the
* effective network security groups that will be updated with the created
* security rules from the Adaptive Network Hardening rules
*/
constructor() {
}

/**
* Defines the metadata of AdaptiveNetworkHardeningEnforceRequest
*
* @returns {object} metadata of AdaptiveNetworkHardeningEnforceRequest
*
*/
mapper() {
return {
required: false,
serializedName: 'AdaptiveNetworkHardeningEnforceRequest',
type: {
name: 'Composite',
className: 'AdaptiveNetworkHardeningEnforceRequest',
modelProperties: {
rules: {
required: true,
serializedName: 'rules',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'RuleElementType',
type: {
name: 'Composite',
className: 'Rule'
}
}
}
},
networkSecurityGroups: {
required: true,
serializedName: 'networkSecurityGroups',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
};
}
}

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

/**
* Response for ListAdaptiveNetworkHardenings API service call
*/
class AdaptiveNetworkHardeningsList extends Array {
/**
* Create a AdaptiveNetworkHardeningsList.
* @property {string} [nextLink] The URL to get the next set of results
*/
constructor() {
super();
}

/**
* Defines the metadata of AdaptiveNetworkHardeningsList
*
* @returns {object} metadata of AdaptiveNetworkHardeningsList
*
*/
mapper() {
return {
required: false,
serializedName: 'AdaptiveNetworkHardeningsList',
type: {
name: 'Composite',
className: 'AdaptiveNetworkHardeningsList',
modelProperties: {
value: {
required: false,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AdaptiveNetworkHardeningElementType',
type: {
name: 'Composite',
className: 'AdaptiveNetworkHardening'
}
}
}
},
nextLink: {
required: false,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AdaptiveNetworkHardeningsList;
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const models = require('./index');
class AdvancedThreatProtectionSetting extends models['Resource'] {
/**
* Create a AdvancedThreatProtectionSetting.
* @member {boolean} [isEnabled] Indicates whether Advanced Threat Protection
* is enabled.
* @property {boolean} [isEnabled] Indicates whether Advanced Threat
* Protection is enabled.
*/
constructor() {
super();
Expand Down
Loading