Skip to content

Commit

Permalink
CodeGen from PR 15857 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 2ff7f8db672e8de2b7b07b27224ecdff9a3fd0d1 into a2ff0f70f7f9de671145d948524d9bd806536cdf
  • Loading branch information
SDKAuto committed Sep 9, 2021
1 parent ffb22c4 commit b4862ac
Show file tree
Hide file tree
Showing 107 changed files with 3,144 additions and 9,897 deletions.
14 changes: 8 additions & 6 deletions sdk/security/arm-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/

In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
#### nodejs - Authentication, client creation, and list complianceResults as an example written in JavaScript.
#### nodejs - Authentication, client creation, and get customAssessmentAutomations as an example written in JavaScript.

##### Sample code

Expand All @@ -49,8 +49,9 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
const creds = new DefaultAzureCredential();
const client = new SecurityCenter(creds, subscriptionId);
const scope = "testscope";
client.complianceResults.list(scope).then((result) => {
const resourceGroupName = "testresourceGroupName";
const customAssessmentAutomationName = "testcustomAssessmentAutomationName";
client.customAssessmentAutomations.get(resourceGroupName, customAssessmentAutomationName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -59,7 +60,7 @@ client.complianceResults.list(scope).then((result) => {
});
```

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

In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
Expand Down Expand Up @@ -87,8 +88,9 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmSecurity.SecurityCenter(creds, subscriptionId);
const scope = "testscope";
client.complianceResults.list(scope).then((result) => {
const resourceGroupName = "testresourceGroupName";
const customAssessmentAutomationName = "testcustomAssessmentAutomationName";
client.customAssessmentAutomations.get(resourceGroupName, customAssessmentAutomationName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion sdk/security/arm-security/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/security/arm-security",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/security/arm-security",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export {
AscLocation,
AssessmentLinks,
AssessmentStatus,
AssessmentStatusResponse,
AuthenticationDetailsProperties,
AutoProvisioningSetting,
AwAssumeRoleAuthenticationDetailsProperties,
Expand All @@ -45,17 +46,16 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -65,34 +65,22 @@ export {
InformationProtectionPolicy,
InformationType,
IngestionSetting,
IotAlertModel,
IotAlertType,
IotDefenderSettingsModel,
IotRecommendationModel,
IotRecommendationType,
IoTSecurityAlertedDevice,
IoTSecurityDeviceAlert,
IoTSecurityDeviceRecommendation,
IoTSecuritySolutionAnalyticsModel,
IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem,
IotSensorsModel,
IoTSeverityMetrics,
IotSitesModel,
IpAddress,
ListCustomAlertRule,
LocalUserNotAllowed,
LogAnalyticsIdentifier,
MacAddress,
MqttC2DMessagesNotInAllowedRange,
MqttC2DRejectedMessagesNotInAllowedRange,
MqttD2CMessagesNotInAllowedRange,
NetworkInterface,
OnPremiseIotSensor,
OnPremiseResourceDetails,
OnPremiseSqlResourceDetails,
Pricing,
ProcessNotAllowed,
Protocol1,
ProxyServerProperties,
QueryCheck,
QueuePurgesNotInAllowedRange,
Expand All @@ -119,18 +107,19 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export {
AscLocation,
AssessmentLinks,
AssessmentStatus,
AssessmentStatusResponse,
AuthenticationDetailsProperties,
AutoProvisioningSetting,
AwAssumeRoleAuthenticationDetailsProperties,
Expand All @@ -43,17 +44,16 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -63,34 +63,22 @@ export {
InformationProtectionPolicy,
InformationType,
IngestionSetting,
IotAlertModel,
IotAlertType,
IotDefenderSettingsModel,
IotRecommendationModel,
IotRecommendationType,
IoTSecurityAlertedDevice,
IoTSecurityDeviceAlert,
IoTSecurityDeviceRecommendation,
IoTSecuritySolutionAnalyticsModel,
IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem,
IotSensorsModel,
IoTSeverityMetrics,
IotSitesModel,
IpAddress,
ListCustomAlertRule,
LocalUserNotAllowed,
LogAnalyticsIdentifier,
MacAddress,
MqttC2DMessagesNotInAllowedRange,
MqttC2DRejectedMessagesNotInAllowedRange,
MqttD2CMessagesNotInAllowedRange,
NetworkInterface,
OnPremiseIotSensor,
OnPremiseResourceDetails,
OnPremiseSqlResourceDetails,
Pricing,
ProcessNotAllowed,
Protocol1,
ProxyServerProperties,
QueryCheck,
QueuePurgesNotInAllowedRange,
Expand All @@ -117,18 +105,19 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
Expand Down
21 changes: 5 additions & 16 deletions sdk/security/arm-security/src/models/alertsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export {
AscLocation,
AssessmentLinks,
AssessmentStatus,
AssessmentStatusResponse,
AuthenticationDetailsProperties,
AutoProvisioningSetting,
AwAssumeRoleAuthenticationDetailsProperties,
Expand All @@ -47,17 +48,16 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -67,34 +67,22 @@ export {
InformationProtectionPolicy,
InformationType,
IngestionSetting,
IotAlertModel,
IotAlertType,
IotDefenderSettingsModel,
IotRecommendationModel,
IotRecommendationType,
IoTSecurityAlertedDevice,
IoTSecurityDeviceAlert,
IoTSecurityDeviceRecommendation,
IoTSecuritySolutionAnalyticsModel,
IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem,
IotSensorsModel,
IoTSeverityMetrics,
IotSitesModel,
IpAddress,
ListCustomAlertRule,
LocalUserNotAllowed,
LogAnalyticsIdentifier,
MacAddress,
MqttC2DMessagesNotInAllowedRange,
MqttC2DRejectedMessagesNotInAllowedRange,
MqttD2CMessagesNotInAllowedRange,
NetworkInterface,
OnPremiseIotSensor,
OnPremiseResourceDetails,
OnPremiseSqlResourceDetails,
Pricing,
ProcessNotAllowed,
Protocol1,
ProxyServerProperties,
QueryCheck,
QueuePurgesNotInAllowedRange,
Expand All @@ -121,18 +109,19 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export {
AscLocation,
AssessmentLinks,
AssessmentStatus,
AssessmentStatusResponse,
AuthenticationDetailsProperties,
AutoProvisioningSetting,
AwAssumeRoleAuthenticationDetailsProperties,
Expand All @@ -44,17 +45,16 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -64,34 +64,22 @@ export {
InformationProtectionPolicy,
InformationType,
IngestionSetting,
IotAlertModel,
IotAlertType,
IotDefenderSettingsModel,
IotRecommendationModel,
IotRecommendationType,
IoTSecurityAlertedDevice,
IoTSecurityDeviceAlert,
IoTSecurityDeviceRecommendation,
IoTSecuritySolutionAnalyticsModel,
IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem,
IotSensorsModel,
IoTSeverityMetrics,
IotSitesModel,
IpAddress,
ListCustomAlertRule,
LocalUserNotAllowed,
LogAnalyticsIdentifier,
MacAddress,
MqttC2DMessagesNotInAllowedRange,
MqttC2DRejectedMessagesNotInAllowedRange,
MqttD2CMessagesNotInAllowedRange,
NetworkInterface,
OnPremiseIotSensor,
OnPremiseResourceDetails,
OnPremiseSqlResourceDetails,
Pricing,
ProcessNotAllowed,
Protocol1,
ProxyServerProperties,
QueryCheck,
QueuePurgesNotInAllowedRange,
Expand All @@ -118,18 +106,19 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
Expand Down
Loading

0 comments on commit b4862ac

Please sign in to comment.