Skip to content

Commit

Permalink
CodeGen from PR 16489 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b7a18047fbc7aa71b94915a6a73999e2882f446a into e81093786c17f18d3bf322970a48cb0bf6967dd5
  • Loading branch information
SDKAuto committed Oct 21, 2021
1 parent a596e3c commit 0cd681e
Show file tree
Hide file tree
Showing 108 changed files with 4,032 additions and 9,552 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,18 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CustomAssessmentAutomationRequest,
CustomEntityStoreAssignment,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -65,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 @@ -119,22 +109,24 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
SuppressionAlertsScope,
SystemData,
ThresholdCustomAlertRule,
TimeWindowCustomAlertRule,
TwinUpdatesNotInAllowedRange,
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,18 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CustomAssessmentAutomationRequest,
CustomEntityStoreAssignment,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -63,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 @@ -117,22 +107,24 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
SuppressionAlertsScope,
SystemData,
ThresholdCustomAlertRule,
TimeWindowCustomAlertRule,
TwinUpdatesNotInAllowedRange,
Expand Down
24 changes: 8 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,18 @@ export {
ConnectorSetting,
ContainerRegistryVulnerabilityProperties,
CustomAlertRule,
CustomAssessmentAutomation,
CustomAssessmentAutomationRequest,
CustomEntityStoreAssignment,
CVE,
CVSS,
DataExportSettings,
DenylistCustomAlertRule,
Device,
DeviceSecurityGroup,
DirectMethodInvokesNotInAllowedRange,
EffectiveNetworkSecurityGroups,
FailedLocalLoginsNotInAllowedRange,
FileUploadsNotInAllowedRange,
Firmware,
GcpCredentialsDetailsProperties,
HttpC2DMessagesNotInAllowedRange,
HttpC2DRejectedMessagesNotInAllowedRange,
Expand All @@ -67,34 +69,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,22 +111,24 @@ export {
SecurityAssessmentMetadata,
SecurityAssessmentMetadataPartnerData,
SecurityAssessmentMetadataProperties,
SecurityAssessmentMetadataPropertiesResponsePublishDates,
SecurityAssessmentMetadataResponse,
SecurityAssessmentPartnerData,
SecurityAssessmentResponse,
SecurityContact,
SecuritySubAssessment,
SecurityTask,
SecurityTaskParameters,
SensitivityLabel,
Sensor,
ServerVulnerabilityAssessment,
ServerVulnerabilityProperties,
ServicePrincipalProperties,
Setting,
Site,
Software,
SqlServerVulnerabilityProperties,
SubAssessmentStatus,
SuppressionAlertsScope,
SystemData,
ThresholdCustomAlertRule,
TimeWindowCustomAlertRule,
TwinUpdatesNotInAllowedRange,
Expand Down
Loading

0 comments on commit 0cd681e

Please sign in to comment.