@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
package/src/operations/alerts.ts
CHANGED
|
@@ -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 { Alerts } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,15 +19,15 @@ import {
|
|
|
18
19
|
Alert,
|
|
19
20
|
AlertsListNextOptionalParams,
|
|
20
21
|
AlertsListOptionalParams,
|
|
22
|
+
AlertsListResponse,
|
|
21
23
|
AlertsListByResourceGroupNextOptionalParams,
|
|
22
24
|
AlertsListByResourceGroupOptionalParams,
|
|
25
|
+
AlertsListByResourceGroupResponse,
|
|
23
26
|
AlertsListSubscriptionLevelByRegionNextOptionalParams,
|
|
24
27
|
AlertsListSubscriptionLevelByRegionOptionalParams,
|
|
28
|
+
AlertsListSubscriptionLevelByRegionResponse,
|
|
25
29
|
AlertsListResourceGroupLevelByRegionNextOptionalParams,
|
|
26
30
|
AlertsListResourceGroupLevelByRegionOptionalParams,
|
|
27
|
-
AlertsListResponse,
|
|
28
|
-
AlertsListByResourceGroupResponse,
|
|
29
|
-
AlertsListSubscriptionLevelByRegionResponse,
|
|
30
31
|
AlertsListResourceGroupLevelByRegionResponse,
|
|
31
32
|
AlertsGetSubscriptionLevelOptionalParams,
|
|
32
33
|
AlertsGetSubscriptionLevelResponse,
|
|
@@ -76,22 +77,34 @@ export class AlertsImpl implements Alerts {
|
|
|
76
77
|
[Symbol.asyncIterator]() {
|
|
77
78
|
return this;
|
|
78
79
|
},
|
|
79
|
-
byPage: () => {
|
|
80
|
-
|
|
80
|
+
byPage: (settings?: PageSettings) => {
|
|
81
|
+
if (settings?.maxPageSize) {
|
|
82
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
83
|
+
}
|
|
84
|
+
return this.listPagingPage(options, settings);
|
|
81
85
|
}
|
|
82
86
|
};
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
private async *listPagingPage(
|
|
86
|
-
options?: AlertsListOptionalParams
|
|
90
|
+
options?: AlertsListOptionalParams,
|
|
91
|
+
settings?: PageSettings
|
|
87
92
|
): AsyncIterableIterator<Alert[]> {
|
|
88
|
-
let result
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
let result: AlertsListResponse;
|
|
94
|
+
let continuationToken = settings?.continuationToken;
|
|
95
|
+
if (!continuationToken) {
|
|
96
|
+
result = await this._list(options);
|
|
97
|
+
let page = result.value || [];
|
|
98
|
+
continuationToken = result.nextLink;
|
|
99
|
+
setContinuationToken(page, continuationToken);
|
|
100
|
+
yield page;
|
|
101
|
+
}
|
|
91
102
|
while (continuationToken) {
|
|
92
103
|
result = await this._listNext(continuationToken, options);
|
|
93
104
|
continuationToken = result.nextLink;
|
|
94
|
-
|
|
105
|
+
let page = result.value || [];
|
|
106
|
+
setContinuationToken(page, continuationToken);
|
|
107
|
+
yield page;
|
|
95
108
|
}
|
|
96
109
|
}
|
|
97
110
|
|
|
@@ -121,19 +134,33 @@ export class AlertsImpl implements Alerts {
|
|
|
121
134
|
[Symbol.asyncIterator]() {
|
|
122
135
|
return this;
|
|
123
136
|
},
|
|
124
|
-
byPage: () => {
|
|
125
|
-
|
|
137
|
+
byPage: (settings?: PageSettings) => {
|
|
138
|
+
if (settings?.maxPageSize) {
|
|
139
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
140
|
+
}
|
|
141
|
+
return this.listByResourceGroupPagingPage(
|
|
142
|
+
resourceGroupName,
|
|
143
|
+
options,
|
|
144
|
+
settings
|
|
145
|
+
);
|
|
126
146
|
}
|
|
127
147
|
};
|
|
128
148
|
}
|
|
129
149
|
|
|
130
150
|
private async *listByResourceGroupPagingPage(
|
|
131
151
|
resourceGroupName: string,
|
|
132
|
-
options?: AlertsListByResourceGroupOptionalParams
|
|
152
|
+
options?: AlertsListByResourceGroupOptionalParams,
|
|
153
|
+
settings?: PageSettings
|
|
133
154
|
): AsyncIterableIterator<Alert[]> {
|
|
134
|
-
let result
|
|
135
|
-
|
|
136
|
-
|
|
155
|
+
let result: AlertsListByResourceGroupResponse;
|
|
156
|
+
let continuationToken = settings?.continuationToken;
|
|
157
|
+
if (!continuationToken) {
|
|
158
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
159
|
+
let page = result.value || [];
|
|
160
|
+
continuationToken = result.nextLink;
|
|
161
|
+
setContinuationToken(page, continuationToken);
|
|
162
|
+
yield page;
|
|
163
|
+
}
|
|
137
164
|
while (continuationToken) {
|
|
138
165
|
result = await this._listByResourceGroupNext(
|
|
139
166
|
resourceGroupName,
|
|
@@ -141,7 +168,9 @@ export class AlertsImpl implements Alerts {
|
|
|
141
168
|
options
|
|
142
169
|
);
|
|
143
170
|
continuationToken = result.nextLink;
|
|
144
|
-
|
|
171
|
+
let page = result.value || [];
|
|
172
|
+
setContinuationToken(page, continuationToken);
|
|
173
|
+
yield page;
|
|
145
174
|
}
|
|
146
175
|
}
|
|
147
176
|
|
|
@@ -178,10 +207,14 @@ export class AlertsImpl implements Alerts {
|
|
|
178
207
|
[Symbol.asyncIterator]() {
|
|
179
208
|
return this;
|
|
180
209
|
},
|
|
181
|
-
byPage: () => {
|
|
210
|
+
byPage: (settings?: PageSettings) => {
|
|
211
|
+
if (settings?.maxPageSize) {
|
|
212
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
213
|
+
}
|
|
182
214
|
return this.listSubscriptionLevelByRegionPagingPage(
|
|
183
215
|
ascLocation,
|
|
184
|
-
options
|
|
216
|
+
options,
|
|
217
|
+
settings
|
|
185
218
|
);
|
|
186
219
|
}
|
|
187
220
|
};
|
|
@@ -189,14 +222,18 @@ export class AlertsImpl implements Alerts {
|
|
|
189
222
|
|
|
190
223
|
private async *listSubscriptionLevelByRegionPagingPage(
|
|
191
224
|
ascLocation: string,
|
|
192
|
-
options?: AlertsListSubscriptionLevelByRegionOptionalParams
|
|
225
|
+
options?: AlertsListSubscriptionLevelByRegionOptionalParams,
|
|
226
|
+
settings?: PageSettings
|
|
193
227
|
): AsyncIterableIterator<Alert[]> {
|
|
194
|
-
let result
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
228
|
+
let result: AlertsListSubscriptionLevelByRegionResponse;
|
|
229
|
+
let continuationToken = settings?.continuationToken;
|
|
230
|
+
if (!continuationToken) {
|
|
231
|
+
result = await this._listSubscriptionLevelByRegion(ascLocation, options);
|
|
232
|
+
let page = result.value || [];
|
|
233
|
+
continuationToken = result.nextLink;
|
|
234
|
+
setContinuationToken(page, continuationToken);
|
|
235
|
+
yield page;
|
|
236
|
+
}
|
|
200
237
|
while (continuationToken) {
|
|
201
238
|
result = await this._listSubscriptionLevelByRegionNext(
|
|
202
239
|
ascLocation,
|
|
@@ -204,7 +241,9 @@ export class AlertsImpl implements Alerts {
|
|
|
204
241
|
options
|
|
205
242
|
);
|
|
206
243
|
continuationToken = result.nextLink;
|
|
207
|
-
|
|
244
|
+
let page = result.value || [];
|
|
245
|
+
setContinuationToken(page, continuationToken);
|
|
246
|
+
yield page;
|
|
208
247
|
}
|
|
209
248
|
}
|
|
210
249
|
|
|
@@ -246,11 +285,15 @@ export class AlertsImpl implements Alerts {
|
|
|
246
285
|
[Symbol.asyncIterator]() {
|
|
247
286
|
return this;
|
|
248
287
|
},
|
|
249
|
-
byPage: () => {
|
|
288
|
+
byPage: (settings?: PageSettings) => {
|
|
289
|
+
if (settings?.maxPageSize) {
|
|
290
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
291
|
+
}
|
|
250
292
|
return this.listResourceGroupLevelByRegionPagingPage(
|
|
251
293
|
ascLocation,
|
|
252
294
|
resourceGroupName,
|
|
253
|
-
options
|
|
295
|
+
options,
|
|
296
|
+
settings
|
|
254
297
|
);
|
|
255
298
|
}
|
|
256
299
|
};
|
|
@@ -259,15 +302,22 @@ export class AlertsImpl implements Alerts {
|
|
|
259
302
|
private async *listResourceGroupLevelByRegionPagingPage(
|
|
260
303
|
ascLocation: string,
|
|
261
304
|
resourceGroupName: string,
|
|
262
|
-
options?: AlertsListResourceGroupLevelByRegionOptionalParams
|
|
305
|
+
options?: AlertsListResourceGroupLevelByRegionOptionalParams,
|
|
306
|
+
settings?: PageSettings
|
|
263
307
|
): AsyncIterableIterator<Alert[]> {
|
|
264
|
-
let result
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
308
|
+
let result: AlertsListResourceGroupLevelByRegionResponse;
|
|
309
|
+
let continuationToken = settings?.continuationToken;
|
|
310
|
+
if (!continuationToken) {
|
|
311
|
+
result = await this._listResourceGroupLevelByRegion(
|
|
312
|
+
ascLocation,
|
|
313
|
+
resourceGroupName,
|
|
314
|
+
options
|
|
315
|
+
);
|
|
316
|
+
let page = result.value || [];
|
|
317
|
+
continuationToken = result.nextLink;
|
|
318
|
+
setContinuationToken(page, continuationToken);
|
|
319
|
+
yield page;
|
|
320
|
+
}
|
|
271
321
|
while (continuationToken) {
|
|
272
322
|
result = await this._listResourceGroupLevelByRegionNext(
|
|
273
323
|
ascLocation,
|
|
@@ -276,7 +326,9 @@ export class AlertsImpl implements Alerts {
|
|
|
276
326
|
options
|
|
277
327
|
);
|
|
278
328
|
continuationToken = result.nextLink;
|
|
279
|
-
|
|
329
|
+
let page = result.value || [];
|
|
330
|
+
setContinuationToken(page, continuationToken);
|
|
331
|
+
yield page;
|
|
280
332
|
}
|
|
281
333
|
}
|
|
282
334
|
|
|
@@ -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 { AlertsSuppressionRules } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -53,22 +54,34 @@ export class AlertsSuppressionRulesImpl implements AlertsSuppressionRules {
|
|
|
53
54
|
[Symbol.asyncIterator]() {
|
|
54
55
|
return this;
|
|
55
56
|
},
|
|
56
|
-
byPage: () => {
|
|
57
|
-
|
|
57
|
+
byPage: (settings?: PageSettings) => {
|
|
58
|
+
if (settings?.maxPageSize) {
|
|
59
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
60
|
+
}
|
|
61
|
+
return this.listPagingPage(options, settings);
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
private async *listPagingPage(
|
|
63
|
-
options?: AlertsSuppressionRulesListOptionalParams
|
|
67
|
+
options?: AlertsSuppressionRulesListOptionalParams,
|
|
68
|
+
settings?: PageSettings
|
|
64
69
|
): AsyncIterableIterator<AlertsSuppressionRule[]> {
|
|
65
|
-
let result
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
let result: AlertsSuppressionRulesListResponse;
|
|
71
|
+
let continuationToken = settings?.continuationToken;
|
|
72
|
+
if (!continuationToken) {
|
|
73
|
+
result = await this._list(options);
|
|
74
|
+
let page = result.value || [];
|
|
75
|
+
continuationToken = result.nextLink;
|
|
76
|
+
setContinuationToken(page, continuationToken);
|
|
77
|
+
yield page;
|
|
78
|
+
}
|
|
68
79
|
while (continuationToken) {
|
|
69
80
|
result = await this._listNext(continuationToken, options);
|
|
70
81
|
continuationToken = result.nextLink;
|
|
71
|
-
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
setContinuationToken(page, continuationToken);
|
|
84
|
+
yield page;
|
|
72
85
|
}
|
|
73
86
|
}
|
|
74
87
|
|
|
@@ -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 { AllowedConnections } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,9 +17,9 @@ import {
|
|
|
16
17
|
AllowedConnectionsResource,
|
|
17
18
|
AllowedConnectionsListNextOptionalParams,
|
|
18
19
|
AllowedConnectionsListOptionalParams,
|
|
20
|
+
AllowedConnectionsListResponse,
|
|
19
21
|
AllowedConnectionsListByHomeRegionNextOptionalParams,
|
|
20
22
|
AllowedConnectionsListByHomeRegionOptionalParams,
|
|
21
|
-
AllowedConnectionsListResponse,
|
|
22
23
|
AllowedConnectionsListByHomeRegionResponse,
|
|
23
24
|
ConnectionType,
|
|
24
25
|
AllowedConnectionsGetOptionalParams,
|
|
@@ -55,22 +56,34 @@ export class AllowedConnectionsImpl implements AllowedConnections {
|
|
|
55
56
|
[Symbol.asyncIterator]() {
|
|
56
57
|
return this;
|
|
57
58
|
},
|
|
58
|
-
byPage: () => {
|
|
59
|
-
|
|
59
|
+
byPage: (settings?: PageSettings) => {
|
|
60
|
+
if (settings?.maxPageSize) {
|
|
61
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
62
|
+
}
|
|
63
|
+
return this.listPagingPage(options, settings);
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
private async *listPagingPage(
|
|
65
|
-
options?: AllowedConnectionsListOptionalParams
|
|
69
|
+
options?: AllowedConnectionsListOptionalParams,
|
|
70
|
+
settings?: PageSettings
|
|
66
71
|
): AsyncIterableIterator<AllowedConnectionsResource[]> {
|
|
67
|
-
let result
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
let result: AllowedConnectionsListResponse;
|
|
73
|
+
let continuationToken = settings?.continuationToken;
|
|
74
|
+
if (!continuationToken) {
|
|
75
|
+
result = await this._list(options);
|
|
76
|
+
let page = result.value || [];
|
|
77
|
+
continuationToken = result.nextLink;
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
70
81
|
while (continuationToken) {
|
|
71
82
|
result = await this._listNext(continuationToken, options);
|
|
72
83
|
continuationToken = result.nextLink;
|
|
73
|
-
|
|
84
|
+
let page = result.value || [];
|
|
85
|
+
setContinuationToken(page, continuationToken);
|
|
86
|
+
yield page;
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
|
|
@@ -100,19 +113,29 @@ export class AllowedConnectionsImpl implements AllowedConnections {
|
|
|
100
113
|
[Symbol.asyncIterator]() {
|
|
101
114
|
return this;
|
|
102
115
|
},
|
|
103
|
-
byPage: () => {
|
|
104
|
-
|
|
116
|
+
byPage: (settings?: PageSettings) => {
|
|
117
|
+
if (settings?.maxPageSize) {
|
|
118
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
119
|
+
}
|
|
120
|
+
return this.listByHomeRegionPagingPage(ascLocation, options, settings);
|
|
105
121
|
}
|
|
106
122
|
};
|
|
107
123
|
}
|
|
108
124
|
|
|
109
125
|
private async *listByHomeRegionPagingPage(
|
|
110
126
|
ascLocation: string,
|
|
111
|
-
options?: AllowedConnectionsListByHomeRegionOptionalParams
|
|
127
|
+
options?: AllowedConnectionsListByHomeRegionOptionalParams,
|
|
128
|
+
settings?: PageSettings
|
|
112
129
|
): AsyncIterableIterator<AllowedConnectionsResource[]> {
|
|
113
|
-
let result
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
let result: AllowedConnectionsListByHomeRegionResponse;
|
|
131
|
+
let continuationToken = settings?.continuationToken;
|
|
132
|
+
if (!continuationToken) {
|
|
133
|
+
result = await this._listByHomeRegion(ascLocation, options);
|
|
134
|
+
let page = result.value || [];
|
|
135
|
+
continuationToken = result.nextLink;
|
|
136
|
+
setContinuationToken(page, continuationToken);
|
|
137
|
+
yield page;
|
|
138
|
+
}
|
|
116
139
|
while (continuationToken) {
|
|
117
140
|
result = await this._listByHomeRegionNext(
|
|
118
141
|
ascLocation,
|
|
@@ -120,7 +143,9 @@ export class AllowedConnectionsImpl implements AllowedConnections {
|
|
|
120
143
|
options
|
|
121
144
|
);
|
|
122
145
|
continuationToken = result.nextLink;
|
|
123
|
-
|
|
146
|
+
let page = result.value || [];
|
|
147
|
+
setContinuationToken(page, continuationToken);
|
|
148
|
+
yield page;
|
|
124
149
|
}
|
|
125
150
|
}
|
|
126
151
|
|
|
@@ -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 { Applications } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -48,22 +49,34 @@ export class ApplicationsImpl implements Applications {
|
|
|
48
49
|
[Symbol.asyncIterator]() {
|
|
49
50
|
return this;
|
|
50
51
|
},
|
|
51
|
-
byPage: () => {
|
|
52
|
-
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
private async *listPagingPage(
|
|
58
|
-
options?: ApplicationsListOptionalParams
|
|
62
|
+
options?: ApplicationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
59
64
|
): AsyncIterableIterator<Application[]> {
|
|
60
|
-
let result
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
let result: ApplicationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
63
74
|
while (continuationToken) {
|
|
64
75
|
result = await this._listNext(continuationToken, options);
|
|
65
76
|
continuationToken = result.nextLink;
|
|
66
|
-
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -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 { Assessments } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -58,23 +59,35 @@ export class AssessmentsImpl implements Assessments {
|
|
|
58
59
|
[Symbol.asyncIterator]() {
|
|
59
60
|
return this;
|
|
60
61
|
},
|
|
61
|
-
byPage: () => {
|
|
62
|
-
|
|
62
|
+
byPage: (settings?: PageSettings) => {
|
|
63
|
+
if (settings?.maxPageSize) {
|
|
64
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
65
|
+
}
|
|
66
|
+
return this.listPagingPage(scope, options, settings);
|
|
63
67
|
}
|
|
64
68
|
};
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
private async *listPagingPage(
|
|
68
72
|
scope: string,
|
|
69
|
-
options?: AssessmentsListOptionalParams
|
|
73
|
+
options?: AssessmentsListOptionalParams,
|
|
74
|
+
settings?: PageSettings
|
|
70
75
|
): AsyncIterableIterator<SecurityAssessmentResponse[]> {
|
|
71
|
-
let result
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
let result: AssessmentsListResponse;
|
|
77
|
+
let continuationToken = settings?.continuationToken;
|
|
78
|
+
if (!continuationToken) {
|
|
79
|
+
result = await this._list(scope, options);
|
|
80
|
+
let page = result.value || [];
|
|
81
|
+
continuationToken = result.nextLink;
|
|
82
|
+
setContinuationToken(page, continuationToken);
|
|
83
|
+
yield page;
|
|
84
|
+
}
|
|
74
85
|
while (continuationToken) {
|
|
75
86
|
result = await this._listNext(scope, continuationToken, options);
|
|
76
87
|
continuationToken = result.nextLink;
|
|
77
|
-
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
setContinuationToken(page, continuationToken);
|
|
90
|
+
yield page;
|
|
78
91
|
}
|
|
79
92
|
}
|
|
80
93
|
|
|
@@ -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 { AssessmentsMetadata } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,12 +17,12 @@ import {
|
|
|
16
17
|
SecurityAssessmentMetadataResponse,
|
|
17
18
|
AssessmentsMetadataListNextOptionalParams,
|
|
18
19
|
AssessmentsMetadataListOptionalParams,
|
|
20
|
+
AssessmentsMetadataListResponse,
|
|
19
21
|
AssessmentsMetadataListBySubscriptionNextOptionalParams,
|
|
20
22
|
AssessmentsMetadataListBySubscriptionOptionalParams,
|
|
21
|
-
|
|
23
|
+
AssessmentsMetadataListBySubscriptionResponse,
|
|
22
24
|
AssessmentsMetadataGetOptionalParams,
|
|
23
25
|
AssessmentsMetadataGetResponse,
|
|
24
|
-
AssessmentsMetadataListBySubscriptionResponse,
|
|
25
26
|
AssessmentsMetadataGetInSubscriptionOptionalParams,
|
|
26
27
|
AssessmentsMetadataGetInSubscriptionResponse,
|
|
27
28
|
AssessmentsMetadataCreateInSubscriptionOptionalParams,
|
|
@@ -59,22 +60,34 @@ export class AssessmentsMetadataImpl implements AssessmentsMetadata {
|
|
|
59
60
|
[Symbol.asyncIterator]() {
|
|
60
61
|
return this;
|
|
61
62
|
},
|
|
62
|
-
byPage: () => {
|
|
63
|
-
|
|
63
|
+
byPage: (settings?: PageSettings) => {
|
|
64
|
+
if (settings?.maxPageSize) {
|
|
65
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
66
|
+
}
|
|
67
|
+
return this.listPagingPage(options, settings);
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
private async *listPagingPage(
|
|
69
|
-
options?: AssessmentsMetadataListOptionalParams
|
|
73
|
+
options?: AssessmentsMetadataListOptionalParams,
|
|
74
|
+
settings?: PageSettings
|
|
70
75
|
): AsyncIterableIterator<SecurityAssessmentMetadataResponse[]> {
|
|
71
|
-
let result
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
let result: AssessmentsMetadataListResponse;
|
|
77
|
+
let continuationToken = settings?.continuationToken;
|
|
78
|
+
if (!continuationToken) {
|
|
79
|
+
result = await this._list(options);
|
|
80
|
+
let page = result.value || [];
|
|
81
|
+
continuationToken = result.nextLink;
|
|
82
|
+
setContinuationToken(page, continuationToken);
|
|
83
|
+
yield page;
|
|
84
|
+
}
|
|
74
85
|
while (continuationToken) {
|
|
75
86
|
result = await this._listNext(continuationToken, options);
|
|
76
87
|
continuationToken = result.nextLink;
|
|
77
|
-
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
setContinuationToken(page, continuationToken);
|
|
90
|
+
yield page;
|
|
78
91
|
}
|
|
79
92
|
}
|
|
80
93
|
|
|
@@ -101,22 +114,34 @@ export class AssessmentsMetadataImpl implements AssessmentsMetadata {
|
|
|
101
114
|
[Symbol.asyncIterator]() {
|
|
102
115
|
return this;
|
|
103
116
|
},
|
|
104
|
-
byPage: () => {
|
|
105
|
-
|
|
117
|
+
byPage: (settings?: PageSettings) => {
|
|
118
|
+
if (settings?.maxPageSize) {
|
|
119
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
120
|
+
}
|
|
121
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
106
122
|
}
|
|
107
123
|
};
|
|
108
124
|
}
|
|
109
125
|
|
|
110
126
|
private async *listBySubscriptionPagingPage(
|
|
111
|
-
options?: AssessmentsMetadataListBySubscriptionOptionalParams
|
|
127
|
+
options?: AssessmentsMetadataListBySubscriptionOptionalParams,
|
|
128
|
+
settings?: PageSettings
|
|
112
129
|
): AsyncIterableIterator<SecurityAssessmentMetadataResponse[]> {
|
|
113
|
-
let result
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
let result: AssessmentsMetadataListBySubscriptionResponse;
|
|
131
|
+
let continuationToken = settings?.continuationToken;
|
|
132
|
+
if (!continuationToken) {
|
|
133
|
+
result = await this._listBySubscription(options);
|
|
134
|
+
let page = result.value || [];
|
|
135
|
+
continuationToken = result.nextLink;
|
|
136
|
+
setContinuationToken(page, continuationToken);
|
|
137
|
+
yield page;
|
|
138
|
+
}
|
|
116
139
|
while (continuationToken) {
|
|
117
140
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
118
141
|
continuationToken = result.nextLink;
|
|
119
|
-
|
|
142
|
+
let page = result.value || [];
|
|
143
|
+
setContinuationToken(page, continuationToken);
|
|
144
|
+
yield page;
|
|
120
145
|
}
|
|
121
146
|
}
|
|
122
147
|
|
|
@@ -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 { AutoProvisioningSettings } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -52,22 +53,34 @@ export class AutoProvisioningSettingsImpl implements AutoProvisioningSettings {
|
|
|
52
53
|
[Symbol.asyncIterator]() {
|
|
53
54
|
return this;
|
|
54
55
|
},
|
|
55
|
-
byPage: () => {
|
|
56
|
-
|
|
56
|
+
byPage: (settings?: PageSettings) => {
|
|
57
|
+
if (settings?.maxPageSize) {
|
|
58
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
59
|
+
}
|
|
60
|
+
return this.listPagingPage(options, settings);
|
|
57
61
|
}
|
|
58
62
|
};
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
private async *listPagingPage(
|
|
62
|
-
options?: AutoProvisioningSettingsListOptionalParams
|
|
66
|
+
options?: AutoProvisioningSettingsListOptionalParams,
|
|
67
|
+
settings?: PageSettings
|
|
63
68
|
): AsyncIterableIterator<AutoProvisioningSetting[]> {
|
|
64
|
-
let result
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
let result: AutoProvisioningSettingsListResponse;
|
|
70
|
+
let continuationToken = settings?.continuationToken;
|
|
71
|
+
if (!continuationToken) {
|
|
72
|
+
result = await this._list(options);
|
|
73
|
+
let page = result.value || [];
|
|
74
|
+
continuationToken = result.nextLink;
|
|
75
|
+
setContinuationToken(page, continuationToken);
|
|
76
|
+
yield page;
|
|
77
|
+
}
|
|
67
78
|
while (continuationToken) {
|
|
68
79
|
result = await this._listNext(continuationToken, options);
|
|
69
80
|
continuationToken = result.nextLink;
|
|
70
|
-
|
|
81
|
+
let page = result.value || [];
|
|
82
|
+
setContinuationToken(page, continuationToken);
|
|
83
|
+
yield page;
|
|
71
84
|
}
|
|
72
85
|
}
|
|
73
86
|
|