@azure/arm-security 6.0.0-beta.1 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -5
- package/README.md +7 -7
- package/dist/index.js +2502 -1258
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/adaptiveApplicationControlsPutSample.js +6 -6
- package/dist-esm/samples-dev/adaptiveApplicationControlsPutSample.js.map +1 -1
- package/dist-esm/samples-dev/apiCollectionGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionGetSample.js +32 -0
- package/dist-esm/samples-dev/apiCollectionGetSample.js.map +1 -0
- package/dist-esm/samples-dev/apiCollectionListSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionListSample.js +45 -0
- package/dist-esm/samples-dev/apiCollectionListSample.js.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.js +32 -0
- package/dist-esm/samples-dev/apiCollectionOffboardingDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.js +32 -0
- package/dist-esm/samples-dev/apiCollectionOnboardingCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/connectorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/securityConnectorsCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/securityConnectorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/securityConnectorsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsGetSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsListSample.js +1 -1
- package/dist-esm/samples-dev/securityConnectorsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/securityContactsCreateSample.js +1 -1
- package/dist-esm/samples-dev/securityContactsCreateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +151 -47
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +10 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +16 -5
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +227 -107
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +55 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/aPICollection.d.ts +56 -0
- package/dist-esm/src/operations/aPICollection.d.ts.map +1 -0
- package/dist-esm/src/operations/aPICollection.js +191 -0
- package/dist-esm/src/operations/aPICollection.js.map +1 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.d.ts +23 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.d.ts.map +1 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.js +56 -0
- package/dist-esm/src/operations/aPICollectionOffboarding.js.map +1 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.d.ts +24 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.d.ts.map +1 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.js +58 -0
- package/dist-esm/src/operations/aPICollectionOnboarding.js.map +1 -0
- package/dist-esm/src/operations/adaptiveNetworkHardenings.d.ts.map +1 -1
- package/dist-esm/src/operations/adaptiveNetworkHardenings.js +19 -7
- package/dist-esm/src/operations/adaptiveNetworkHardenings.js.map +1 -1
- package/dist-esm/src/operations/alerts.d.ts.map +1 -1
- package/dist-esm/src/operations/alerts.js +73 -28
- package/dist-esm/src/operations/alerts.js.map +1 -1
- package/dist-esm/src/operations/alertsSuppressionRules.d.ts.map +1 -1
- package/dist-esm/src/operations/alertsSuppressionRules.js +19 -7
- package/dist-esm/src/operations/alertsSuppressionRules.js.map +1 -1
- package/dist-esm/src/operations/allowedConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/allowedConnections.js +37 -14
- package/dist-esm/src/operations/allowedConnections.js.map +1 -1
- package/dist-esm/src/operations/applications.d.ts.map +1 -1
- package/dist-esm/src/operations/applications.js +19 -7
- package/dist-esm/src/operations/applications.js.map +1 -1
- package/dist-esm/src/operations/assessments.d.ts.map +1 -1
- package/dist-esm/src/operations/assessments.js +19 -7
- package/dist-esm/src/operations/assessments.js.map +1 -1
- package/dist-esm/src/operations/assessmentsMetadata.d.ts.map +1 -1
- package/dist-esm/src/operations/assessmentsMetadata.js +37 -14
- package/dist-esm/src/operations/assessmentsMetadata.js.map +1 -1
- package/dist-esm/src/operations/autoProvisioningSettings.d.ts.map +1 -1
- package/dist-esm/src/operations/autoProvisioningSettings.js +19 -7
- package/dist-esm/src/operations/autoProvisioningSettings.js.map +1 -1
- package/dist-esm/src/operations/automations.d.ts.map +1 -1
- package/dist-esm/src/operations/automations.js +37 -14
- package/dist-esm/src/operations/automations.js.map +1 -1
- package/dist-esm/src/operations/complianceResults.d.ts.map +1 -1
- package/dist-esm/src/operations/complianceResults.js +19 -7
- package/dist-esm/src/operations/complianceResults.js.map +1 -1
- package/dist-esm/src/operations/compliances.d.ts.map +1 -1
- package/dist-esm/src/operations/compliances.js +19 -7
- package/dist-esm/src/operations/compliances.js.map +1 -1
- package/dist-esm/src/operations/connectors.d.ts.map +1 -1
- package/dist-esm/src/operations/connectors.js +19 -7
- package/dist-esm/src/operations/connectors.js.map +1 -1
- package/dist-esm/src/operations/customAssessmentAutomations.d.ts.map +1 -1
- package/dist-esm/src/operations/customAssessmentAutomations.js +37 -14
- package/dist-esm/src/operations/customAssessmentAutomations.js.map +1 -1
- package/dist-esm/src/operations/customEntityStoreAssignments.d.ts.map +1 -1
- package/dist-esm/src/operations/customEntityStoreAssignments.js +37 -14
- package/dist-esm/src/operations/customEntityStoreAssignments.js.map +1 -1
- package/dist-esm/src/operations/deviceSecurityGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/deviceSecurityGroups.js +19 -7
- package/dist-esm/src/operations/deviceSecurityGroups.js.map +1 -1
- package/dist-esm/src/operations/discoveredSecuritySolutions.d.ts.map +1 -1
- package/dist-esm/src/operations/discoveredSecuritySolutions.js +37 -14
- package/dist-esm/src/operations/discoveredSecuritySolutions.js.map +1 -1
- package/dist-esm/src/operations/externalSecuritySolutions.d.ts.map +1 -1
- package/dist-esm/src/operations/externalSecuritySolutions.js +37 -14
- package/dist-esm/src/operations/externalSecuritySolutions.js.map +1 -1
- package/dist-esm/src/operations/governanceAssignments.d.ts.map +1 -1
- package/dist-esm/src/operations/governanceAssignments.js +19 -7
- package/dist-esm/src/operations/governanceAssignments.js.map +1 -1
- package/dist-esm/src/operations/governanceRuleOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/governanceRuleOperations.js +19 -7
- package/dist-esm/src/operations/governanceRuleOperations.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +3 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/informationProtectionPolicies.d.ts.map +1 -1
- package/dist-esm/src/operations/informationProtectionPolicies.js +19 -7
- package/dist-esm/src/operations/informationProtectionPolicies.js.map +1 -1
- package/dist-esm/src/operations/ingestionSettings.d.ts.map +1 -1
- package/dist-esm/src/operations/ingestionSettings.js +19 -7
- package/dist-esm/src/operations/ingestionSettings.js.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolution.d.ts.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolution.js +37 -14
- package/dist-esm/src/operations/iotSecuritySolution.js.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.d.ts.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.js +19 -7
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.js.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsRecommendation.d.ts.map +1 -1
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsRecommendation.js +19 -7
- package/dist-esm/src/operations/iotSecuritySolutionsAnalyticsRecommendation.js.map +1 -1
- package/dist-esm/src/operations/jitNetworkAccessPolicies.d.ts.map +1 -1
- package/dist-esm/src/operations/jitNetworkAccessPolicies.js +73 -28
- package/dist-esm/src/operations/jitNetworkAccessPolicies.js.map +1 -1
- package/dist-esm/src/operations/locations.d.ts.map +1 -1
- package/dist-esm/src/operations/locations.js +19 -7
- package/dist-esm/src/operations/locations.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -7
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceAssessments.d.ts.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceAssessments.js +19 -7
- package/dist-esm/src/operations/regulatoryComplianceAssessments.js.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceControls.d.ts.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceControls.js +19 -7
- package/dist-esm/src/operations/regulatoryComplianceControls.js.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceStandards.d.ts.map +1 -1
- package/dist-esm/src/operations/regulatoryComplianceStandards.js +19 -7
- package/dist-esm/src/operations/regulatoryComplianceStandards.js.map +1 -1
- package/dist-esm/src/operations/secureScoreControlDefinitions.d.ts.map +1 -1
- package/dist-esm/src/operations/secureScoreControlDefinitions.js +37 -14
- package/dist-esm/src/operations/secureScoreControlDefinitions.js.map +1 -1
- package/dist-esm/src/operations/secureScoreControls.d.ts.map +1 -1
- package/dist-esm/src/operations/secureScoreControls.js +37 -14
- package/dist-esm/src/operations/secureScoreControls.js.map +1 -1
- package/dist-esm/src/operations/secureScores.d.ts.map +1 -1
- package/dist-esm/src/operations/secureScores.js +19 -7
- package/dist-esm/src/operations/secureScores.js.map +1 -1
- package/dist-esm/src/operations/securityConnectorApplications.d.ts.map +1 -1
- package/dist-esm/src/operations/securityConnectorApplications.js +19 -7
- package/dist-esm/src/operations/securityConnectorApplications.js.map +1 -1
- package/dist-esm/src/operations/securityConnectorGovernanceRule.d.ts.map +1 -1
- package/dist-esm/src/operations/securityConnectorGovernanceRule.js +19 -7
- package/dist-esm/src/operations/securityConnectorGovernanceRule.js.map +1 -1
- package/dist-esm/src/operations/securityConnectors.d.ts.map +1 -1
- package/dist-esm/src/operations/securityConnectors.js +37 -14
- package/dist-esm/src/operations/securityConnectors.js.map +1 -1
- package/dist-esm/src/operations/securityContacts.d.ts.map +1 -1
- package/dist-esm/src/operations/securityContacts.js +19 -7
- package/dist-esm/src/operations/securityContacts.js.map +1 -1
- package/dist-esm/src/operations/securitySolutions.d.ts.map +1 -1
- package/dist-esm/src/operations/securitySolutions.js +19 -7
- package/dist-esm/src/operations/securitySolutions.js.map +1 -1
- package/dist-esm/src/operations/settings.d.ts.map +1 -1
- package/dist-esm/src/operations/settings.js +19 -7
- package/dist-esm/src/operations/settings.js.map +1 -1
- package/dist-esm/src/operations/softwareInventories.d.ts.map +1 -1
- package/dist-esm/src/operations/softwareInventories.js +37 -14
- package/dist-esm/src/operations/softwareInventories.js.map +1 -1
- package/dist-esm/src/operations/subAssessments.d.ts.map +1 -1
- package/dist-esm/src/operations/subAssessments.js +37 -14
- package/dist-esm/src/operations/subAssessments.js.map +1 -1
- package/dist-esm/src/operations/tasks.d.ts.map +1 -1
- package/dist-esm/src/operations/tasks.js +55 -21
- package/dist-esm/src/operations/tasks.js.map +1 -1
- package/dist-esm/src/operations/topology.d.ts.map +1 -1
- package/dist-esm/src/operations/topology.js +37 -14
- package/dist-esm/src/operations/topology.js.map +1 -1
- package/dist-esm/src/operations/workspaceSettings.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaceSettings.js +19 -7
- package/dist-esm/src/operations/workspaceSettings.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/aPICollection.d.ts +28 -0
- package/dist-esm/src/operationsInterfaces/aPICollection.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollection.js +9 -0
- package/dist-esm/src/operationsInterfaces/aPICollection.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.d.ts +15 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.js +9 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOffboarding.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.d.ts +16 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.js +9 -0
- package/dist-esm/src/operationsInterfaces/aPICollectionOnboarding.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +3 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/securityCenter.d.ts +4 -1
- package/dist-esm/src/securityCenter.d.ts.map +1 -1
- package/dist-esm/src/securityCenter.js +8 -8
- package/dist-esm/src/securityCenter.js.map +1 -1
- package/package.json +6 -5
- package/review/arm-security.api.md +139 -35
- package/src/index.ts +1 -0
- package/src/models/index.ts +171 -49
- package/src/models/mappers.ts +251 -117
- package/src/models/parameters.ts +59 -1
- package/src/operations/aPICollection.ts +249 -0
- package/src/operations/aPICollectionOffboarding.ts +73 -0
- package/src/operations/aPICollectionOnboarding.ts +78 -0
- package/src/operations/adaptiveNetworkHardenings.ts +28 -14
- package/src/operations/alerts.ts +91 -39
- package/src/operations/alertsSuppressionRules.ts +21 -8
- package/src/operations/allowedConnections.ts +41 -16
- package/src/operations/applications.ts +21 -8
- package/src/operations/assessments.ts +21 -8
- package/src/operations/assessmentsMetadata.ts +42 -17
- package/src/operations/autoProvisioningSettings.ts +21 -8
- package/src/operations/automations.ts +45 -16
- package/src/operations/complianceResults.ts +21 -8
- package/src/operations/compliances.ts +21 -8
- package/src/operations/connectors.ts +21 -8
- package/src/operations/customAssessmentAutomations.ts +46 -17
- package/src/operations/customEntityStoreAssignments.ts +46 -17
- package/src/operations/deviceSecurityGroups.ts +21 -8
- package/src/operations/discoveredSecuritySolutions.ts +41 -16
- package/src/operations/externalSecuritySolutions.ts +41 -16
- package/src/operations/governanceAssignments.ts +21 -8
- package/src/operations/governanceRuleOperations.ts +21 -8
- package/src/operations/index.ts +3 -0
- package/src/operations/informationProtectionPolicies.ts +22 -9
- package/src/operations/ingestionSettings.ts +21 -8
- package/src/operations/iotSecuritySolution.ts +45 -16
- package/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts +26 -8
- package/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts +27 -9
- package/src/operations/jitNetworkAccessPolicies.ts +90 -36
- package/src/operations/locations.ts +21 -8
- package/src/operations/operations.ts +21 -8
- package/src/operations/regulatoryComplianceAssessments.ts +26 -12
- package/src/operations/regulatoryComplianceControls.ts +25 -8
- package/src/operations/regulatoryComplianceStandards.ts +21 -8
- package/src/operations/secureScoreControlDefinitions.ts +41 -16
- package/src/operations/secureScoreControls.ts +45 -16
- package/src/operations/secureScores.ts +21 -8
- package/src/operations/securityConnectorApplications.ts +26 -12
- package/src/operations/securityConnectorGovernanceRule.ts +26 -12
- package/src/operations/securityConnectors.ts +45 -16
- package/src/operations/securityContacts.ts +21 -8
- package/src/operations/securitySolutions.ts +21 -8
- package/src/operations/settings.ts +21 -8
- package/src/operations/softwareInventories.ts +48 -22
- package/src/operations/subAssessments.ts +41 -16
- package/src/operations/tasks.ts +67 -29
- package/src/operations/topology.ts +41 -16
- package/src/operations/workspaceSettings.ts +21 -8
- package/src/operationsInterfaces/aPICollection.ts +51 -0
- package/src/operationsInterfaces/aPICollectionOffboarding.ts +28 -0
- package/src/operationsInterfaces/aPICollectionOnboarding.ts +32 -0
- package/src/operationsInterfaces/index.ts +3 -0
- package/src/pagingHelper.ts +39 -0
- package/src/securityCenter.ts +19 -8
- package/types/arm-security.d.ts +238 -52
- package/types/tsdoc-metadata.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { APICollection } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { SecurityCenter } from "../securityCenter";
|
|
16
|
+
import {
|
|
17
|
+
ApiCollectionResponse,
|
|
18
|
+
APICollectionListNextOptionalParams,
|
|
19
|
+
APICollectionListOptionalParams,
|
|
20
|
+
APICollectionListResponse,
|
|
21
|
+
APICollectionGetOptionalParams,
|
|
22
|
+
APICollectionGetResponse,
|
|
23
|
+
APICollectionListNextResponse
|
|
24
|
+
} from "../models";
|
|
25
|
+
|
|
26
|
+
/// <reference lib="esnext.asynciterable" />
|
|
27
|
+
/** Class containing APICollection operations. */
|
|
28
|
+
export class APICollectionImpl implements APICollection {
|
|
29
|
+
private readonly client: SecurityCenter;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Initialize a new instance of the class APICollection class.
|
|
33
|
+
* @param client Reference to the service client
|
|
34
|
+
*/
|
|
35
|
+
constructor(client: SecurityCenter) {
|
|
36
|
+
this.client = client;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure
|
|
41
|
+
* API Management API is onboarded to Defender for APIs, the system will monitor the operations within
|
|
42
|
+
* the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been
|
|
43
|
+
* detected.
|
|
44
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
45
|
+
* @param serviceName The name of the API Management service.
|
|
46
|
+
* @param options The options parameters.
|
|
47
|
+
*/
|
|
48
|
+
public list(
|
|
49
|
+
resourceGroupName: string,
|
|
50
|
+
serviceName: string,
|
|
51
|
+
options?: APICollectionListOptionalParams
|
|
52
|
+
): PagedAsyncIterableIterator<ApiCollectionResponse> {
|
|
53
|
+
const iter = this.listPagingAll(resourceGroupName, serviceName, options);
|
|
54
|
+
return {
|
|
55
|
+
next() {
|
|
56
|
+
return iter.next();
|
|
57
|
+
},
|
|
58
|
+
[Symbol.asyncIterator]() {
|
|
59
|
+
return this;
|
|
60
|
+
},
|
|
61
|
+
byPage: (settings?: PageSettings) => {
|
|
62
|
+
if (settings?.maxPageSize) {
|
|
63
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
64
|
+
}
|
|
65
|
+
return this.listPagingPage(
|
|
66
|
+
resourceGroupName,
|
|
67
|
+
serviceName,
|
|
68
|
+
options,
|
|
69
|
+
settings
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private async *listPagingPage(
|
|
76
|
+
resourceGroupName: string,
|
|
77
|
+
serviceName: string,
|
|
78
|
+
options?: APICollectionListOptionalParams,
|
|
79
|
+
settings?: PageSettings
|
|
80
|
+
): AsyncIterableIterator<ApiCollectionResponse[]> {
|
|
81
|
+
let result: APICollectionListResponse;
|
|
82
|
+
let continuationToken = settings?.continuationToken;
|
|
83
|
+
if (!continuationToken) {
|
|
84
|
+
result = await this._list(resourceGroupName, serviceName, options);
|
|
85
|
+
let page = result.value || [];
|
|
86
|
+
continuationToken = result.nextLink;
|
|
87
|
+
setContinuationToken(page, continuationToken);
|
|
88
|
+
yield page;
|
|
89
|
+
}
|
|
90
|
+
while (continuationToken) {
|
|
91
|
+
result = await this._listNext(
|
|
92
|
+
resourceGroupName,
|
|
93
|
+
serviceName,
|
|
94
|
+
continuationToken,
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
continuationToken = result.nextLink;
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
setContinuationToken(page, continuationToken);
|
|
100
|
+
yield page;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private async *listPagingAll(
|
|
105
|
+
resourceGroupName: string,
|
|
106
|
+
serviceName: string,
|
|
107
|
+
options?: APICollectionListOptionalParams
|
|
108
|
+
): AsyncIterableIterator<ApiCollectionResponse> {
|
|
109
|
+
for await (const page of this.listPagingPage(
|
|
110
|
+
resourceGroupName,
|
|
111
|
+
serviceName,
|
|
112
|
+
options
|
|
113
|
+
)) {
|
|
114
|
+
yield* page;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure
|
|
120
|
+
* API Management API is onboarded to Defender for APIs, the system will monitor the operations within
|
|
121
|
+
* the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been
|
|
122
|
+
* detected.
|
|
123
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
124
|
+
* @param serviceName The name of the API Management service.
|
|
125
|
+
* @param options The options parameters.
|
|
126
|
+
*/
|
|
127
|
+
private _list(
|
|
128
|
+
resourceGroupName: string,
|
|
129
|
+
serviceName: string,
|
|
130
|
+
options?: APICollectionListOptionalParams
|
|
131
|
+
): Promise<APICollectionListResponse> {
|
|
132
|
+
return this.client.sendOperationRequest(
|
|
133
|
+
{ resourceGroupName, serviceName, options },
|
|
134
|
+
listOperationSpec
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API
|
|
140
|
+
* Management API is onboarded to Defender for APIs, the system will monitor the operations within the
|
|
141
|
+
* Azure API Management API for intrusive behaviors and provide alerts for attacks that have been
|
|
142
|
+
* detected.
|
|
143
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
144
|
+
* @param serviceName The name of the API Management service.
|
|
145
|
+
* @param apiCollectionId A string representing the apiCollections resource within the
|
|
146
|
+
* Microsoft.Security provider namespace. This string matches the Azure API Management API name.
|
|
147
|
+
* @param options The options parameters.
|
|
148
|
+
*/
|
|
149
|
+
get(
|
|
150
|
+
resourceGroupName: string,
|
|
151
|
+
serviceName: string,
|
|
152
|
+
apiCollectionId: string,
|
|
153
|
+
options?: APICollectionGetOptionalParams
|
|
154
|
+
): Promise<APICollectionGetResponse> {
|
|
155
|
+
return this.client.sendOperationRequest(
|
|
156
|
+
{ resourceGroupName, serviceName, apiCollectionId, options },
|
|
157
|
+
getOperationSpec
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* ListNext
|
|
163
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
164
|
+
* @param serviceName The name of the API Management service.
|
|
165
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
166
|
+
* @param options The options parameters.
|
|
167
|
+
*/
|
|
168
|
+
private _listNext(
|
|
169
|
+
resourceGroupName: string,
|
|
170
|
+
serviceName: string,
|
|
171
|
+
nextLink: string,
|
|
172
|
+
options?: APICollectionListNextOptionalParams
|
|
173
|
+
): Promise<APICollectionListNextResponse> {
|
|
174
|
+
return this.client.sendOperationRequest(
|
|
175
|
+
{ resourceGroupName, serviceName, nextLink, options },
|
|
176
|
+
listNextOperationSpec
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Operation Specifications
|
|
181
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
182
|
+
|
|
183
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
184
|
+
path:
|
|
185
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections",
|
|
186
|
+
httpMethod: "GET",
|
|
187
|
+
responses: {
|
|
188
|
+
200: {
|
|
189
|
+
bodyMapper: Mappers.ApiCollectionResponseList
|
|
190
|
+
},
|
|
191
|
+
default: {
|
|
192
|
+
bodyMapper: Mappers.ErrorResponse
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
queryParameters: [Parameters.apiVersion20],
|
|
196
|
+
urlParameters: [
|
|
197
|
+
Parameters.$host,
|
|
198
|
+
Parameters.subscriptionId,
|
|
199
|
+
Parameters.resourceGroupName1,
|
|
200
|
+
Parameters.serviceName
|
|
201
|
+
],
|
|
202
|
+
headerParameters: [Parameters.accept],
|
|
203
|
+
serializer
|
|
204
|
+
};
|
|
205
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
206
|
+
path:
|
|
207
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}",
|
|
208
|
+
httpMethod: "GET",
|
|
209
|
+
responses: {
|
|
210
|
+
200: {
|
|
211
|
+
bodyMapper: Mappers.ApiCollectionResponse
|
|
212
|
+
},
|
|
213
|
+
default: {
|
|
214
|
+
bodyMapper: Mappers.ErrorResponse
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
queryParameters: [Parameters.apiVersion20],
|
|
218
|
+
urlParameters: [
|
|
219
|
+
Parameters.$host,
|
|
220
|
+
Parameters.subscriptionId,
|
|
221
|
+
Parameters.resourceGroupName1,
|
|
222
|
+
Parameters.serviceName,
|
|
223
|
+
Parameters.apiCollectionId
|
|
224
|
+
],
|
|
225
|
+
headerParameters: [Parameters.accept],
|
|
226
|
+
serializer
|
|
227
|
+
};
|
|
228
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
229
|
+
path: "{nextLink}",
|
|
230
|
+
httpMethod: "GET",
|
|
231
|
+
responses: {
|
|
232
|
+
200: {
|
|
233
|
+
bodyMapper: Mappers.ApiCollectionResponseList
|
|
234
|
+
},
|
|
235
|
+
default: {
|
|
236
|
+
bodyMapper: Mappers.ErrorResponse
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
queryParameters: [Parameters.apiVersion20],
|
|
240
|
+
urlParameters: [
|
|
241
|
+
Parameters.$host,
|
|
242
|
+
Parameters.subscriptionId,
|
|
243
|
+
Parameters.nextLink,
|
|
244
|
+
Parameters.resourceGroupName1,
|
|
245
|
+
Parameters.serviceName
|
|
246
|
+
],
|
|
247
|
+
headerParameters: [Parameters.accept],
|
|
248
|
+
serializer
|
|
249
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { APICollectionOffboarding } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { SecurityCenter } from "../securityCenter";
|
|
14
|
+
import { APICollectionOffboardingDeleteOptionalParams } from "../models";
|
|
15
|
+
|
|
16
|
+
/** Class containing APICollectionOffboarding operations. */
|
|
17
|
+
export class APICollectionOffboardingImpl implements APICollectionOffboarding {
|
|
18
|
+
private readonly client: SecurityCenter;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Initialize a new instance of the class APICollectionOffboarding class.
|
|
22
|
+
* @param client Reference to the service client
|
|
23
|
+
*/
|
|
24
|
+
constructor(client: SecurityCenter) {
|
|
25
|
+
this.client = client;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the
|
|
30
|
+
* operations within the Azure API Management API for intrusive behaviors.
|
|
31
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
32
|
+
* @param serviceName The name of the API Management service.
|
|
33
|
+
* @param apiCollectionId A string representing the apiCollections resource within the
|
|
34
|
+
* Microsoft.Security provider namespace. This string matches the Azure API Management API name.
|
|
35
|
+
* @param options The options parameters.
|
|
36
|
+
*/
|
|
37
|
+
delete(
|
|
38
|
+
resourceGroupName: string,
|
|
39
|
+
serviceName: string,
|
|
40
|
+
apiCollectionId: string,
|
|
41
|
+
options?: APICollectionOffboardingDeleteOptionalParams
|
|
42
|
+
): Promise<void> {
|
|
43
|
+
return this.client.sendOperationRequest(
|
|
44
|
+
{ resourceGroupName, serviceName, apiCollectionId, options },
|
|
45
|
+
deleteOperationSpec
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// Operation Specifications
|
|
50
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
51
|
+
|
|
52
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
53
|
+
path:
|
|
54
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}",
|
|
55
|
+
httpMethod: "DELETE",
|
|
56
|
+
responses: {
|
|
57
|
+
200: {},
|
|
58
|
+
204: {},
|
|
59
|
+
default: {
|
|
60
|
+
bodyMapper: Mappers.ErrorResponse
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
queryParameters: [Parameters.apiVersion20],
|
|
64
|
+
urlParameters: [
|
|
65
|
+
Parameters.$host,
|
|
66
|
+
Parameters.subscriptionId,
|
|
67
|
+
Parameters.resourceGroupName1,
|
|
68
|
+
Parameters.serviceName,
|
|
69
|
+
Parameters.apiCollectionId
|
|
70
|
+
],
|
|
71
|
+
headerParameters: [Parameters.accept],
|
|
72
|
+
serializer
|
|
73
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { APICollectionOnboarding } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { SecurityCenter } from "../securityCenter";
|
|
14
|
+
import {
|
|
15
|
+
APICollectionOnboardingCreateOptionalParams,
|
|
16
|
+
APICollectionOnboardingCreateResponse
|
|
17
|
+
} from "../models";
|
|
18
|
+
|
|
19
|
+
/** Class containing APICollectionOnboarding operations. */
|
|
20
|
+
export class APICollectionOnboardingImpl implements APICollectionOnboarding {
|
|
21
|
+
private readonly client: SecurityCenter;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Initialize a new instance of the class APICollectionOnboarding class.
|
|
25
|
+
* @param client Reference to the service client
|
|
26
|
+
*/
|
|
27
|
+
constructor(client: SecurityCenter) {
|
|
28
|
+
this.client = client;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the
|
|
33
|
+
* operations within the Azure Management API for intrusive behaviors and provide alerts for attacks
|
|
34
|
+
* that have been detected.
|
|
35
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
36
|
+
* @param serviceName The name of the API Management service.
|
|
37
|
+
* @param apiCollectionId A string representing the apiCollections resource within the
|
|
38
|
+
* Microsoft.Security provider namespace. This string matches the Azure API Management API name.
|
|
39
|
+
* @param options The options parameters.
|
|
40
|
+
*/
|
|
41
|
+
create(
|
|
42
|
+
resourceGroupName: string,
|
|
43
|
+
serviceName: string,
|
|
44
|
+
apiCollectionId: string,
|
|
45
|
+
options?: APICollectionOnboardingCreateOptionalParams
|
|
46
|
+
): Promise<APICollectionOnboardingCreateResponse> {
|
|
47
|
+
return this.client.sendOperationRequest(
|
|
48
|
+
{ resourceGroupName, serviceName, apiCollectionId, options },
|
|
49
|
+
createOperationSpec
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Operation Specifications
|
|
54
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
55
|
+
|
|
56
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
57
|
+
path:
|
|
58
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}",
|
|
59
|
+
httpMethod: "PUT",
|
|
60
|
+
responses: {
|
|
61
|
+
200: {
|
|
62
|
+
bodyMapper: Mappers.ApiCollectionResponse
|
|
63
|
+
},
|
|
64
|
+
default: {
|
|
65
|
+
bodyMapper: Mappers.ErrorResponse
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
queryParameters: [Parameters.apiVersion20],
|
|
69
|
+
urlParameters: [
|
|
70
|
+
Parameters.$host,
|
|
71
|
+
Parameters.subscriptionId,
|
|
72
|
+
Parameters.resourceGroupName1,
|
|
73
|
+
Parameters.serviceName,
|
|
74
|
+
Parameters.apiCollectionId
|
|
75
|
+
],
|
|
76
|
+
headerParameters: [Parameters.accept],
|
|
77
|
+
serializer
|
|
78
|
+
};
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { AdaptiveNetworkHardenings } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -70,13 +71,17 @@ export class AdaptiveNetworkHardeningsImpl
|
|
|
70
71
|
[Symbol.asyncIterator]() {
|
|
71
72
|
return this;
|
|
72
73
|
},
|
|
73
|
-
byPage: () => {
|
|
74
|
+
byPage: (settings?: PageSettings) => {
|
|
75
|
+
if (settings?.maxPageSize) {
|
|
76
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
77
|
+
}
|
|
74
78
|
return this.listByExtendedResourcePagingPage(
|
|
75
79
|
resourceGroupName,
|
|
76
80
|
resourceNamespace,
|
|
77
81
|
resourceType,
|
|
78
82
|
resourceName,
|
|
79
|
-
options
|
|
83
|
+
options,
|
|
84
|
+
settings
|
|
80
85
|
);
|
|
81
86
|
}
|
|
82
87
|
};
|
|
@@ -87,17 +92,24 @@ export class AdaptiveNetworkHardeningsImpl
|
|
|
87
92
|
resourceNamespace: string,
|
|
88
93
|
resourceType: string,
|
|
89
94
|
resourceName: string,
|
|
90
|
-
options?: AdaptiveNetworkHardeningsListByExtendedResourceOptionalParams
|
|
95
|
+
options?: AdaptiveNetworkHardeningsListByExtendedResourceOptionalParams,
|
|
96
|
+
settings?: PageSettings
|
|
91
97
|
): AsyncIterableIterator<AdaptiveNetworkHardening[]> {
|
|
92
|
-
let result
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
let result: AdaptiveNetworkHardeningsListByExtendedResourceResponse;
|
|
99
|
+
let continuationToken = settings?.continuationToken;
|
|
100
|
+
if (!continuationToken) {
|
|
101
|
+
result = await this._listByExtendedResource(
|
|
102
|
+
resourceGroupName,
|
|
103
|
+
resourceNamespace,
|
|
104
|
+
resourceType,
|
|
105
|
+
resourceName,
|
|
106
|
+
options
|
|
107
|
+
);
|
|
108
|
+
let page = result.value || [];
|
|
109
|
+
continuationToken = result.nextLink;
|
|
110
|
+
setContinuationToken(page, continuationToken);
|
|
111
|
+
yield page;
|
|
112
|
+
}
|
|
101
113
|
while (continuationToken) {
|
|
102
114
|
result = await this._listByExtendedResourceNext(
|
|
103
115
|
resourceGroupName,
|
|
@@ -108,7 +120,9 @@ export class AdaptiveNetworkHardeningsImpl
|
|
|
108
120
|
options
|
|
109
121
|
);
|
|
110
122
|
continuationToken = result.nextLink;
|
|
111
|
-
|
|
123
|
+
let page = result.value || [];
|
|
124
|
+
setContinuationToken(page, continuationToken);
|
|
125
|
+
yield page;
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
128
|
|