diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5bef36401d32..182ab24a20d4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4032,7 +4032,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230309 + typescript: 5.1.0-dev.20230312 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8957,9 +8957,9 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230309: - resolution: {integrity: sha512-pCqgzbHDsuACtq0v+pjNY6Zf7cdWZstY38Jq7FfD1HqAeEGnFKhrZgSRh7kS/QE5UOctGAqbp1ynTGdVI7s4Mw==} - engines: {node: '>=4.2.0'} + /typescript/5.1.0-dev.20230312: + resolution: {integrity: sha512-BgRjQo+gKHSDuo3JJpCydBfDqFbOxmDNmuTl7H/A3TZWdNiWuOHI4tgI9w6QRrvJ9CplHe5EQE2+2dqGXqxTvA==} + engines: {node: '>=12.20'} hasBin: true dev: false @@ -14623,10 +14623,11 @@ packages: dev: false file:projects/arm-security.tgz: - resolution: {integrity: sha512-V55N84XbBtRWgZBTkfN27VBaLK8glA2Wo+dvG39pwHiCYotoHN9jYBKdz2Ud2nza2WJaZFPxQwSxZYDMc4mhIA==, tarball: file:projects/arm-security.tgz} + resolution: {integrity: sha512-mkoBisAIjslZ+KPxn8xFcleRMutD3w5CDd4Q3U9law+H2BKj4/UPuJpcQgc6RJmDBfrF3kleQ9sFMCu1SUwsHQ==, tarball: file:projects/arm-security.tgz} name: '@rush-temp/arm-security' version: 0.0.0 dependencies: + '@azure-tools/test-recorder': 2.0.0 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.4_@types+node@14.18.37 '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 @@ -14637,7 +14638,8 @@ packages: '@types/node': 14.18.37 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -14646,6 +14648,7 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: + - encoding - supports-color dev: false @@ -17654,7 +17657,7 @@ packages: dev: false file:projects/keyvault-admin.tgz: - resolution: {integrity: sha512-s4NxTw0qqENCSJYvtlPyCXPgueoVmiy1iB5nUV6ZZIXDein+SiGbPDe9AqhQaMLIIPYuOIYqNqUZzSkF/UVsow==, tarball: file:projects/keyvault-admin.tgz} + resolution: {integrity: sha512-WSclv7y5aWDIF6263syupSa4w9fyPmNlcZjQeBB3XBVyxBDuxAJz/aX4UR2NRJcJ5ki96kD6vdaLoAIbzlNj1A==, tarball: file:projects/keyvault-admin.tgz} name: '@rush-temp/keyvault-admin' version: 0.0.0 dependencies: @@ -17684,7 +17687,7 @@ packages: dev: false file:projects/keyvault-certificates.tgz: - resolution: {integrity: sha512-bAOUuJYxu7UjhLiiTrxlGZh1kv+QqyLkBI1f10AdzZxOsd3bWAqdO/wnFr1WT7irLzYkrx3e1M2yNZsSlZG1yQ==, tarball: file:projects/keyvault-certificates.tgz} + resolution: {integrity: sha512-+TlMG/tyYlPFevmmP/XKl8hABuotZg+XSUSZnIhczwq8aXNvblynbltH8USbhX9UWIBTH4CqIYQUUVxXpM2psw==, tarball: file:projects/keyvault-certificates.tgz} name: '@rush-temp/keyvault-certificates' version: 0.0.0 dependencies: diff --git a/sdk/security/arm-security/CHANGELOG.md b/sdk/security/arm-security/CHANGELOG.md index 2199fb8928b1..5d05ca6b0a2b 100644 --- a/sdk/security/arm-security/CHANGELOG.md +++ b/sdk/security/arm-security/CHANGELOG.md @@ -1,16 +1,6 @@ # Release History - -## 6.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 6.0.0-beta.2 (2022-11-15) + +## 6.0.0-beta.3 (2023-03-13) **Features** @@ -20,14 +10,11 @@ - Added operation group ApplicationOperations - Added operation group Applications - Added operation group GovernanceAssignments - - Added operation group GovernanceRuleOperations - Added operation group GovernanceRules + - Added operation group HealthReportOperations + - Added operation group HealthReports - Added operation group SecurityConnectorApplication - Added operation group SecurityConnectorApplications - - Added operation group SecurityConnectorGovernanceRule - - Added operation group SecurityConnectorGovernanceRules - - Added operation group SecurityConnectorGovernanceRulesExecuteStatus - - Added operation group SubscriptionGovernanceRulesExecuteStatus - Added operation Alerts.beginSimulate - Added operation Alerts.beginSimulateAndWait - Added operation Alerts.updateResourceGroupLevelStateToInProgress @@ -138,10 +125,12 @@ - Added Interface DirectMethodInvokesNotInAllowedRange - Added Interface DiscoveredSecuritySolution - Added Interface EnvironmentData + - Added Interface EnvironmentDetails - Added Interface ErrorDetail + - Added Interface ErrorDetailAutoGenerated - Added Interface ErrorResponse + - Added Interface ErrorResponseAutoGenerated - Added Interface ExecuteGovernanceRuleParams - - Added Interface ExecuteRuleStatus - Added Interface ExternalSecuritySolution - Added Interface FailedLocalLoginsNotInAllowedRange - Added Interface FileUploadsNotInAllowedRange @@ -164,16 +153,24 @@ - Added Interface GovernanceRule - Added Interface GovernanceRuleEmailNotification - Added Interface GovernanceRuleList - - Added Interface GovernanceRuleListNextOptionalParams - - Added Interface GovernanceRuleListOptionalParams + - Added Interface GovernanceRuleMetadata - Added Interface GovernanceRuleOwnerSource - Added Interface GovernanceRulesCreateOrUpdateOptionalParams + - Added Interface GovernanceRulesDeleteHeaders - Added Interface GovernanceRulesDeleteOptionalParams + - Added Interface GovernanceRulesExecuteHeaders + - Added Interface GovernanceRulesExecuteOptionalParams - Added Interface GovernanceRulesGetOptionalParams - - Added Interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders - - Added Interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams - - Added Interface GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders - - Added Interface GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams + - Added Interface GovernanceRulesListNextOptionalParams + - Added Interface GovernanceRulesListOptionalParams + - Added Interface GovernanceRulesOperationResultsHeaders + - Added Interface GovernanceRulesOperationResultsOptionalParams + - Added Interface HealthDataClassification + - Added Interface HealthReport + - Added Interface HealthReportGetOptionalParams + - Added Interface HealthReportsList + - Added Interface HealthReportsListNextOptionalParams + - Added Interface HealthReportsListOptionalParams - Added Interface HttpC2DMessagesNotInAllowedRange - Added Interface HttpC2DRejectedMessagesNotInAllowedRange - Added Interface HttpD2CMessagesNotInAllowedRange @@ -184,6 +181,7 @@ - Added Interface IoTSecurityAggregatedRecommendation - Added Interface IoTSecuritySolutionAnalyticsModel - Added Interface IoTSecuritySolutionModel + - Added Interface Issue - Added Interface JitNetworkAccessPolicy - Added Interface ListCustomAlertRule - Added Interface LocalUserNotAllowed @@ -194,6 +192,7 @@ - Added Interface MqttD2CMessagesNotInAllowedRange - Added Interface OnPremiseResourceDetails - Added Interface OnPremiseSqlResourceDetails + - Added Interface OperationResultAutoGenerated - Added Interface Pricing - Added Interface ProcessNotAllowed - Added Interface QueuePurgesNotInAllowedRange @@ -201,6 +200,7 @@ - Added Interface RegulatoryComplianceControl - Added Interface RegulatoryComplianceStandard - Added Interface RemediationEta + - Added Interface ResourceDetailsAutoGenerated - Added Interface RuleResults - Added Interface Scan - Added Interface ScanResult @@ -220,13 +220,6 @@ - Added Interface SecurityConnectorApplicationGetOptionalParams - Added Interface SecurityConnectorApplicationsListNextOptionalParams - Added Interface SecurityConnectorApplicationsListOptionalParams - - Added Interface SecurityConnectorGovernanceRuleListNextOptionalParams - - Added Interface SecurityConnectorGovernanceRuleListOptionalParams - - Added Interface SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams - - Added Interface SecurityConnectorGovernanceRulesDeleteOptionalParams - - Added Interface SecurityConnectorGovernanceRulesExecuteStatusGetHeaders - - Added Interface SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams - - Added Interface SecurityConnectorGovernanceRulesGetOptionalParams - Added Interface SecurityContact - Added Interface SecurityContactPropertiesAlertNotifications - Added Interface SecurityContactPropertiesNotificationsByRole @@ -239,8 +232,7 @@ - Added Interface Setting - Added Interface Software - Added Interface SqlServerVulnerabilityProperties - - Added Interface SubscriptionGovernanceRulesExecuteStatusGetHeaders - - Added Interface SubscriptionGovernanceRulesExecuteStatusGetOptionalParams + - Added Interface StatusAutoGenerated - Added Interface ThresholdCustomAlertRule - Added Interface TimeWindowCustomAlertRule - Added Interface TopologyResource @@ -269,47 +261,35 @@ - Added Type Alias GovernanceAssignmentsListNextResponse - Added Type Alias GovernanceAssignmentsListResponse - Added Type Alias GovernanceRuleConditionOperator - - Added Type Alias GovernanceRuleListNextResponse - - Added Type Alias GovernanceRuleListResponse - Added Type Alias GovernanceRuleOwnerSourceType - Added Type Alias GovernanceRulesCreateOrUpdateResponse + - Added Type Alias GovernanceRulesExecuteResponse - Added Type Alias GovernanceRulesGetResponse + - Added Type Alias GovernanceRulesListNextResponse + - Added Type Alias GovernanceRulesListResponse + - Added Type Alias GovernanceRulesOperationResultsResponse - Added Type Alias GovernanceRuleSourceResourceType - - Added Type Alias GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse - - Added Type Alias GovernanceRulesRuleIdExecuteSingleSubscriptionResponse - Added Type Alias GovernanceRuleType + - Added Type Alias HealthReportGetResponse + - Added Type Alias HealthReportsListNextResponse + - Added Type Alias HealthReportsListResponse - Added Type Alias MinimalSeverity + - Added Type Alias OperationResult - Added Type Alias Roles - Added Type Alias ScanningMode + - Added Type Alias ScopeName - Added Type Alias SecurityConnectorApplicationCreateOrUpdateResponse - Added Type Alias SecurityConnectorApplicationGetResponse - Added Type Alias SecurityConnectorApplicationsListNextResponse - Added Type Alias SecurityConnectorApplicationsListResponse - - Added Type Alias SecurityConnectorGovernanceRuleListNextResponse - - Added Type Alias SecurityConnectorGovernanceRuleListResponse - - Added Type Alias SecurityConnectorGovernanceRulesCreateOrUpdateResponse - - Added Type Alias SecurityConnectorGovernanceRulesExecuteStatusGetResponse - - Added Type Alias SecurityConnectorGovernanceRulesGetResponse + - Added Type Alias StatusName - Added Type Alias SubPlan - - Added Type Alias SubscriptionGovernanceRulesExecuteStatusGetResponse - Added Type Alias Type - Interface AlertsSimulateOptionalParams has a new optional parameter resumeFrom - Interface AlertsSimulateOptionalParams has a new optional parameter updateIntervalInMs - Interface DefenderForServersAwsOfferingArcAutoProvisioning has a new optional parameter cloudRoleArn - - Class SecurityCenter has a new parameter aPICollection - - Class SecurityCenter has a new parameter aPICollectionOffboarding - - Class SecurityCenter has a new parameter aPICollectionOnboarding - - Class SecurityCenter has a new parameter applicationOperations - - Class SecurityCenter has a new parameter applications - - Class SecurityCenter has a new parameter governanceAssignments - - Class SecurityCenter has a new parameter governanceRuleOperations - - Class SecurityCenter has a new parameter governanceRules - - Class SecurityCenter has a new parameter securityConnectorApplication - - Class SecurityCenter has a new parameter securityConnectorApplications - - Class SecurityCenter has a new parameter securityConnectorGovernanceRule - - Class SecurityCenter has a new parameter securityConnectorGovernanceRules - - Class SecurityCenter has a new parameter securityConnectorGovernanceRulesExecuteStatus - - Class SecurityCenter has a new parameter subscriptionGovernanceRulesExecuteStatus + - Interface ScanProperties has a new optional parameter lastScanTime + - Type of parameter offeringType of interface CloudOffering is changed from "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAws" | "InformationProtectionAws" to "CspmMonitorAws" | "DefenderForContainersAws" | "DefenderForServersAws" | "DefenderForDatabasesAws" | "InformationProtectionAws" | "CspmMonitorGcp" | "DefenderForServersGcp" | "DefenderForDatabasesGcp" | "DefenderForContainersGcp" | "CspmMonitorGithub" | "CspmMonitorAzureDevOps" | "DefenderCspmAws" | "DefenderCspmGcp" | "DefenderForDevOpsGithub" | "DefenderForDevOpsAzureDevOps" - Added Enum KnownApplicationConditionOperator - Added Enum KnownApplicationSourceResourceType - Added Enum KnownEnvironmentType @@ -318,8 +298,11 @@ - Added Enum KnownGovernanceRuleSourceResourceType - Added Enum KnownGovernanceRuleType - Added Enum KnownMinimalSeverity + - Added Enum KnownOperationResult - Added Enum KnownRoles - Added Enum KnownScanningMode + - Added Enum KnownScopeName + - Added Enum KnownStatusName - Added Enum KnownSubPlan - Added Enum KnownType - Enum KnownAlertStatus has a new value InProgress @@ -338,13 +321,28 @@ - Enum KnownOfferingType has a new value DefenderForDevOpsGithub - Enum KnownOfferingType has a new value DefenderForServersGcp - Enum KnownSettingName has a new value WdatpUnifiedSolution + - Added function getContinuationToken **Breaking Changes** - Removed operation Alerts.simulate - Removed operation SecurityContacts.update - Operation AllowedConnections.get has a new signature + - Interface AlertsSuppressionRulesListNextOptionalParams no longer has parameter alertType - Interface DefenderForServersAwsOfferingArcAutoProvisioning no longer has parameter servicePrincipalSecretMetadata + - Interface IotSecuritySolutionListByResourceGroupNextOptionalParams no longer has parameter filter + - Interface IotSecuritySolutionListBySubscriptionNextOptionalParams no longer has parameter filter + - Interface IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams no longer has parameter top + - Interface IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams no longer has parameter top + - Interface RegulatoryComplianceAssessmentsListNextOptionalParams no longer has parameter filter + - Interface RegulatoryComplianceControlsListNextOptionalParams no longer has parameter filter + - Interface RegulatoryComplianceStandardsListNextOptionalParams no longer has parameter filter + - Interface SecureScoreControlsListBySecureScoreNextOptionalParams no longer has parameter expand + - Interface SecureScoreControlsListNextOptionalParams no longer has parameter expand + - Interface TasksListByHomeRegionNextOptionalParams no longer has parameter filter + - Interface TasksListByResourceGroupNextOptionalParams no longer has parameter filter + - Interface TasksListNextOptionalParams no longer has parameter filter + - Type of parameter value of interface ExternalSecuritySolutionList is changed from ExternalSecuritySolutionUnion[] to ExternalSecuritySolution[] - Removed Enum KnownAlertNotifications - Removed Enum KnownAlertsToAdmins diff --git a/sdk/security/arm-security/LICENSE b/sdk/security/arm-security/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/security/arm-security/LICENSE +++ b/sdk/security/arm-security/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/security/arm-security/_meta.json b/sdk/security/arm-security/_meta.json index 5a4c130037f8..76f14d8a57d3 100644 --- a/sdk/security/arm-security/_meta.json +++ b/sdk/security/arm-security/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d8461c6480ba57b5163c48795e917e7c1d99d4fd", + "commit": "a68e9756aa2b0003053f298cfbc2eb7e3ad8819d", "readme": "specification/security/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\security\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/security/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.9", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.9" } \ No newline at end of file diff --git a/sdk/security/arm-security/package.json b/sdk/security/arm-security/package.json index f21e3b961971..8d01d7389ff3 100644 --- a/sdk/security/arm-security/package.json +++ b/sdk/security/arm-security/package.json @@ -8,10 +8,10 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,14 +33,15 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", "@types/chai": "^4.2.8", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-security?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/security/arm-security" +} \ No newline at end of file diff --git a/sdk/security/arm-security/review/arm-security.api.md b/sdk/security/arm-security/review/arm-security.api.md index 887688a4dfad..e5e97a09e3ca 100644 --- a/sdk/security/arm-security/review/arm-security.api.md +++ b/sdk/security/arm-security/review/arm-security.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type AadConnectivityState = string; @@ -114,7 +114,7 @@ export interface AdaptiveNetworkHardeningEnforceRequest { // @public export interface AdaptiveNetworkHardenings { - beginEnforce(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, body: AdaptiveNetworkHardeningEnforceRequest, options?: AdaptiveNetworkHardeningsEnforceOptionalParams): Promise, void>>; + beginEnforce(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, body: AdaptiveNetworkHardeningEnforceRequest, options?: AdaptiveNetworkHardeningsEnforceOptionalParams): Promise, void>>; beginEnforceAndWait(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, body: AdaptiveNetworkHardeningEnforceRequest, options?: AdaptiveNetworkHardeningsEnforceOptionalParams): Promise; get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, adaptiveNetworkHardeningResourceName: string, options?: AdaptiveNetworkHardeningsGetOptionalParams): Promise; listByExtendedResource(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: AdaptiveNetworkHardeningsListByExtendedResourceOptionalParams): PagedAsyncIterableIterator; @@ -254,7 +254,7 @@ export interface AlertPropertiesSupportingEvidence { // @public export interface Alerts { - beginSimulate(ascLocation: string, alertSimulatorRequestBody: AlertSimulatorRequestBody, options?: AlertsSimulateOptionalParams): Promise, void>>; + beginSimulate(ascLocation: string, alertSimulatorRequestBody: AlertSimulatorRequestBody, options?: AlertsSimulateOptionalParams): Promise, void>>; beginSimulateAndWait(ascLocation: string, alertSimulatorRequestBody: AlertSimulatorRequestBody, options?: AlertsSimulateOptionalParams): Promise; getResourceGroupLevel(resourceGroupName: string, ascLocation: string, alertName: string, options?: AlertsGetResourceGroupLevelOptionalParams): Promise; getSubscriptionLevel(ascLocation: string, alertName: string, options?: AlertsGetSubscriptionLevelOptionalParams): Promise; @@ -410,7 +410,6 @@ export interface AlertsSuppressionRulesList { // @public export interface AlertsSuppressionRulesListNextOptionalParams extends coreClient.OperationOptions { - alertType?: string; } // @public @@ -1995,6 +1994,15 @@ export interface EnvironmentData { // @public (undocumented) export type EnvironmentDataUnion = EnvironmentData | AwsEnvironmentData | GcpProjectEnvironmentData | GithubScopeEnvironmentData | AzureDevOpsScopeEnvironmentData; +// @public +export interface EnvironmentDetails { + environmentHierarchyId?: string; + nativeResourceId?: string; + organizationalHierarchyId?: string; + subscriptionId?: string; + tenantId?: string; +} + // @public export type EnvironmentType = string; @@ -2013,11 +2021,25 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorDetailAutoGenerated { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetailAutoGenerated[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetailAutoGenerated; +} + // @public export interface ETag { etag?: string; @@ -2032,11 +2054,6 @@ export interface ExecuteGovernanceRuleParams { override?: boolean; } -// @public -export interface ExecuteRuleStatus { - readonly operationId?: string; -} - // @public export type ExpandControlsEnum = string; @@ -2265,14 +2282,18 @@ export interface GovernanceRule extends Resource { conditionSets?: Record[]; description?: string; displayName?: string; + excludedScopes?: string[]; governanceEmailNotification?: GovernanceRuleEmailNotification; + includeMemberScopes?: boolean; isDisabled?: boolean; isGracePeriod?: boolean; + metadata?: GovernanceRuleMetadata; ownerSource?: GovernanceRuleOwnerSource; remediationTimeframe?: string; rulePriority?: number; ruleType?: GovernanceRuleType; sourceResourceType?: GovernanceRuleSourceResourceType; + readonly tenantId?: string; } // @public @@ -2291,22 +2312,11 @@ export interface GovernanceRuleList { } // @public -export interface GovernanceRuleListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GovernanceRuleListNextResponse = GovernanceRuleList; - -// @public -export interface GovernanceRuleListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GovernanceRuleListResponse = GovernanceRuleList; - -// @public -export interface GovernanceRuleOperations { - list(options?: GovernanceRuleListOptionalParams): PagedAsyncIterableIterator; +export interface GovernanceRuleMetadata { + readonly createdBy?: string; + readonly createdOn?: Date; + readonly updatedBy?: string; + readonly updatedOn?: Date; } // @public @@ -2320,13 +2330,14 @@ export type GovernanceRuleOwnerSourceType = string; // @public export interface GovernanceRules { - beginRuleIdExecuteSingleSecurityConnector(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams): Promise, GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse>>; - beginRuleIdExecuteSingleSecurityConnectorAndWait(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams): Promise; - beginRuleIdExecuteSingleSubscription(ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams): Promise, GovernanceRulesRuleIdExecuteSingleSubscriptionResponse>>; - beginRuleIdExecuteSingleSubscriptionAndWait(ruleId: string, options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams): Promise; - createOrUpdate(ruleId: string, governanceRule: GovernanceRule, options?: GovernanceRulesCreateOrUpdateOptionalParams): Promise; - delete(ruleId: string, options?: GovernanceRulesDeleteOptionalParams): Promise; - get(ruleId: string, options?: GovernanceRulesGetOptionalParams): Promise; + beginDelete(scope: string, ruleId: string, options?: GovernanceRulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(scope: string, ruleId: string, options?: GovernanceRulesDeleteOptionalParams): Promise; + beginExecute(scope: string, ruleId: string, options?: GovernanceRulesExecuteOptionalParams): Promise, GovernanceRulesExecuteResponse>>; + beginExecuteAndWait(scope: string, ruleId: string, options?: GovernanceRulesExecuteOptionalParams): Promise; + createOrUpdate(scope: string, ruleId: string, governanceRule: GovernanceRule, options?: GovernanceRulesCreateOrUpdateOptionalParams): Promise; + get(scope: string, ruleId: string, options?: GovernanceRulesGetOptionalParams): Promise; + list(scope: string, options?: GovernanceRulesListOptionalParams): PagedAsyncIterableIterator; + operationResults(scope: string, ruleId: string, operationId: string, options?: GovernanceRulesOperationResultsOptionalParams): Promise; } // @public @@ -2336,10 +2347,32 @@ export interface GovernanceRulesCreateOrUpdateOptionalParams extends coreClient. // @public export type GovernanceRulesCreateOrUpdateResponse = GovernanceRule; +// @public +export interface GovernanceRulesDeleteHeaders { + location?: string; +} + // @public export interface GovernanceRulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } +// @public +export interface GovernanceRulesExecuteHeaders { + location?: string; +} + +// @public +export interface GovernanceRulesExecuteOptionalParams extends coreClient.OperationOptions { + executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GovernanceRulesExecuteResponse = GovernanceRulesExecuteHeaders; + // @public export interface GovernanceRulesGetOptionalParams extends coreClient.OperationOptions { } @@ -2348,41 +2381,91 @@ export interface GovernanceRulesGetOptionalParams extends coreClient.OperationOp export type GovernanceRulesGetResponse = GovernanceRule; // @public -export type GovernanceRuleSourceResourceType = string; +export interface GovernanceRulesListNextOptionalParams extends coreClient.OperationOptions { +} // @public -export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders { - location?: string; -} +export type GovernanceRulesListNextResponse = GovernanceRuleList; // @public -export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams extends coreClient.OperationOptions { - executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface GovernanceRulesListOptionalParams extends coreClient.OperationOptions { } // @public -export type GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse = GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders; +export type GovernanceRulesListResponse = GovernanceRuleList; // @public -export interface GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders { +export interface GovernanceRulesOperationResultsHeaders { location?: string; } // @public -export interface GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams extends coreClient.OperationOptions { - executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface GovernanceRulesOperationResultsOptionalParams extends coreClient.OperationOptions { } // @public -export type GovernanceRulesRuleIdExecuteSingleSubscriptionResponse = GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders; +export type GovernanceRulesOperationResultsResponse = OperationResultAutoGenerated; + +// @public +export type GovernanceRuleSourceResourceType = string; // @public export type GovernanceRuleType = string; +// @public +export interface HealthDataClassification { + component?: string; + scenario?: string; + scope?: ScopeName; +} + +// @public +export interface HealthReport extends Resource { + affectedDefendersPlans?: string[]; + environmentDetails?: EnvironmentDetails; + healthDataClassification?: HealthDataClassification; + issues?: Issue[]; + resourceDetails?: ResourceDetailsAutoGenerated; + status?: StatusAutoGenerated; +} + +// @public +export interface HealthReportGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HealthReportGetResponse = HealthReport; + +// @public +export interface HealthReportOperations { + get(resourceId: string, healthReportName: string, options?: HealthReportGetOptionalParams): Promise; +} + +// @public +export interface HealthReports { + list(scope: string, options?: HealthReportsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface HealthReportsList { + readonly nextLink?: string; + readonly value?: HealthReport[]; +} + +// @public +export interface HealthReportsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HealthReportsListNextResponse = HealthReportsList; + +// @public +export interface HealthReportsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HealthReportsListResponse = HealthReportsList; + // @public export interface HttpC2DMessagesNotInAllowedRange extends TimeWindowCustomAlertRule { ruleType: "HttpC2DMessagesNotInAllowedRange"; @@ -2723,7 +2806,6 @@ export type IotSecuritySolutionGetResponse = IoTSecuritySolutionModel; // @public export interface IotSecuritySolutionListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -2739,7 +2821,6 @@ export type IotSecuritySolutionListByResourceGroupResponse = IoTSecuritySolution // @public export interface IotSecuritySolutionListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -2790,7 +2871,6 @@ export type IotSecuritySolutionsAnalyticsAggregatedAlertGetResponse = IoTSecurit // @public export interface IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -2819,7 +2899,6 @@ export type IotSecuritySolutionsAnalyticsRecommendationGetResponse = IoTSecurity // @public export interface IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -2853,6 +2932,19 @@ export interface IoTSeverityMetrics { medium?: number; } +// @public +export interface Issue { + issueAdditionalData?: { + [propertyName: string]: string; + }; + issueDescription?: string; + issueKey: string; + issueName?: string; + remediationScript?: string; + remediationSteps?: string; + securityValues?: string[]; +} + // @public export interface JitNetworkAccessPolicies { createOrUpdate(resourceGroupName: string, ascLocation: string, jitNetworkAccessPolicyName: string, body: JitNetworkAccessPolicy, options?: JitNetworkAccessPoliciesCreateOrUpdateOptionalParams): Promise; @@ -3384,6 +3476,13 @@ export enum KnownOfferingType { InformationProtectionAws = "InformationProtectionAws" } +// @public +export enum KnownOperationResult { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + // @public export enum KnownOperator { Contains = "Contains", @@ -3553,6 +3652,14 @@ export enum KnownScanTriggerType { Recurring = "Recurring" } +// @public +export enum KnownScopeName { + Clusters = "Clusters", + Connectors = "Connectors", + Unknown = "Unknown", + VirtualMachines = "VirtualMachines" +} + // @public export enum KnownSecurityFamily { Ngfw = "Ngfw", @@ -3636,6 +3743,13 @@ export enum KnownStatus { Revoked = "Revoked" } +// @public +export enum KnownStatusName { + Healthy = "Healthy", + NotApplicable = "NotApplicable", + NotHealthy = "NotHealthy" +} + // @public export enum KnownStatusReason { Expired = "Expired", @@ -3988,6 +4102,14 @@ export interface OperationList { value?: Operation[]; } +// @public +export type OperationResult = string; + +// @public +export interface OperationResultAutoGenerated { + readonly status?: OperationResult; +} + // @public export interface Operations { list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; @@ -4180,7 +4302,6 @@ export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAss // @public export interface RegulatoryComplianceAssessmentsListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -4224,7 +4345,6 @@ export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceContro // @public export interface RegulatoryComplianceControlsListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -4269,7 +4389,6 @@ export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStand // @public export interface RegulatoryComplianceStandardsListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -4312,6 +4431,13 @@ export interface ResourceDetails { source: "Azure" | "OnPremise" | "OnPremiseSql"; } +// @public +export interface ResourceDetailsAutoGenerated { + readonly connectorId?: string; + readonly id?: string; + source?: Source; +} + // @public (undocumented) export type ResourceDetailsUnion = ResourceDetails | AzureResourceDetails | OnPremiseResourceDetailsUnion; @@ -4396,6 +4522,7 @@ export interface ScanProperties { endTime?: Date; highSeverityFailedRulesCount?: number; isBaselineApplied?: boolean; + lastScanTime?: Date; lowSeverityFailedRulesCount?: number; mediumSeverityFailedRulesCount?: number; server?: string; @@ -4446,6 +4573,9 @@ export interface ScopeElement { field?: string; } +// @public +export type ScopeName = string; + // @public export interface SecureScoreControlDefinitionItem extends Resource { readonly assessmentDefinitions?: AzureResourceLink[]; @@ -4534,7 +4664,6 @@ export interface SecureScoreControlScore { // @public export interface SecureScoreControlsListBySecureScoreNextOptionalParams extends coreClient.OperationOptions { - expand?: ExpandControlsEnum; } // @public @@ -4550,7 +4679,6 @@ export type SecureScoreControlsListBySecureScoreResponse = SecureScoreControlLis // @public export interface SecureScoreControlsListNextOptionalParams extends coreClient.OperationOptions { - expand?: ExpandControlsEnum; } // @public @@ -4815,10 +4943,12 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) governanceAssignments: GovernanceAssignments; // (undocumented) - governanceRuleOperations: GovernanceRuleOperations; - // (undocumented) governanceRules: GovernanceRules; // (undocumented) + healthReportOperations: HealthReportOperations; + // (undocumented) + healthReports: HealthReports; + // (undocumented) informationProtectionPolicies: InformationProtectionPolicies; // (undocumented) ingestionSettings: IngestionSettings; @@ -4857,12 +4987,6 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) securityConnectorApplications: SecurityConnectorApplications; // (undocumented) - securityConnectorGovernanceRule: SecurityConnectorGovernanceRule; - // (undocumented) - securityConnectorGovernanceRules: SecurityConnectorGovernanceRules; - // (undocumented) - securityConnectorGovernanceRulesExecuteStatus: SecurityConnectorGovernanceRulesExecuteStatus; - // (undocumented) securityConnectors: SecurityConnectors; // (undocumented) securityContacts: SecurityContacts; @@ -4885,8 +5009,6 @@ export class SecurityCenter extends coreClient.ServiceClient { // (undocumented) subAssessments: SubAssessments; // (undocumented) - subscriptionGovernanceRulesExecuteStatus: SubscriptionGovernanceRulesExecuteStatus; - // (undocumented) subscriptionId: string; // (undocumented) tasks: Tasks; @@ -4956,70 +5078,6 @@ export interface SecurityConnectorApplicationsListOptionalParams extends coreCli // @public export type SecurityConnectorApplicationsListResponse = ApplicationsList; -// @public -export interface SecurityConnectorGovernanceRule { - list(resourceGroupName: string, securityConnectorName: string, options?: SecurityConnectorGovernanceRuleListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SecurityConnectorGovernanceRuleListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityConnectorGovernanceRuleListNextResponse = GovernanceRuleList; - -// @public -export interface SecurityConnectorGovernanceRuleListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityConnectorGovernanceRuleListResponse = GovernanceRuleList; - -// @public -export interface SecurityConnectorGovernanceRules { - createOrUpdate(resourceGroupName: string, securityConnectorName: string, ruleId: string, governanceRule: GovernanceRule, options?: SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: SecurityConnectorGovernanceRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, securityConnectorName: string, ruleId: string, options?: SecurityConnectorGovernanceRulesGetOptionalParams): Promise; -} - -// @public -export interface SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityConnectorGovernanceRulesCreateOrUpdateResponse = GovernanceRule; - -// @public -export interface SecurityConnectorGovernanceRulesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface SecurityConnectorGovernanceRulesExecuteStatus { - beginGet(resourceGroupName: string, securityConnectorName: string, ruleId: string, operationId: string, options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams): Promise, SecurityConnectorGovernanceRulesExecuteStatusGetResponse>>; - beginGetAndWait(resourceGroupName: string, securityConnectorName: string, ruleId: string, operationId: string, options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams): Promise; -} - -// @public -export interface SecurityConnectorGovernanceRulesExecuteStatusGetHeaders { - location?: string; -} - -// @public -export interface SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SecurityConnectorGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; - -// @public -export interface SecurityConnectorGovernanceRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SecurityConnectorGovernanceRulesGetResponse = GovernanceRule; - // @public export interface SecurityConnectors { createOrUpdate(resourceGroupName: string, securityConnectorName: string, securityConnector: SecurityConnector, options?: SecurityConnectorsCreateOrUpdateOptionalParams): Promise; @@ -5324,7 +5382,7 @@ export type ServerVulnerabilityAssessmentListByExtendedResourceResponse = Server // @public export interface ServerVulnerabilityAssessmentOperations { - beginDelete(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentDeleteOptionalParams): Promise; createOrUpdate(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, resourceNamespace: string, resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentGetOptionalParams): Promise; @@ -5585,6 +5643,16 @@ export type State = string; // @public export type Status = string; +// @public +export interface StatusAutoGenerated { + code?: StatusName; + readonly firstEvaluationDate?: Date; + readonly statusChangeDate?: Date; +} + +// @public +export type StatusName = string; + // @public export type StatusReason = string; @@ -5644,26 +5712,6 @@ export type SubAssessmentStatusCode = string; // @public export type SubPlan = string; -// @public -export interface SubscriptionGovernanceRulesExecuteStatus { - beginGet(ruleId: string, operationId: string, options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams): Promise, SubscriptionGovernanceRulesExecuteStatusGetResponse>>; - beginGetAndWait(ruleId: string, operationId: string, options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams): Promise; -} - -// @public -export interface SubscriptionGovernanceRulesExecuteStatusGetHeaders { - location?: string; -} - -// @public -export interface SubscriptionGovernanceRulesExecuteStatusGetOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SubscriptionGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; - // @public export type SupportedCloudEnum = string; @@ -5726,7 +5774,6 @@ export type TasksGetSubscriptionLevelTaskResponse = SecurityTask; // @public export interface TasksListByHomeRegionNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -5742,7 +5789,6 @@ export type TasksListByHomeRegionResponse = SecurityTaskList; // @public export interface TasksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -5758,7 +5804,6 @@ export type TasksListByResourceGroupResponse = SecurityTaskList; // @public export interface TasksListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public diff --git a/sdk/security/arm-security/src/lroImpl.ts b/sdk/security/arm-security/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/security/arm-security/src/lroImpl.ts +++ b/sdk/security/arm-security/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/security/arm-security/src/models/index.ts b/sdk/security/arm-security/src/models/index.ts index a4e105602890..5bb9cae4bbf4 100644 --- a/sdk/security/arm-security/src/models/index.ts +++ b/sdk/security/arm-security/src/models/index.ts @@ -1488,174 +1488,6 @@ export interface AuthenticationDetailsProperties { readonly grantedPermissions?: PermissionProperty[]; } -/** A vulnerability assessment scan record properties. */ -export interface ScanProperties { - /** The scan trigger type. */ - triggerType?: ScanTriggerType; - /** The scan status. */ - state?: ScanState; - /** The server name. */ - server?: string; - /** The database name. */ - database?: string; - /** The SQL version. */ - sqlVersion?: string; - /** The scan start time (UTC). */ - startTime?: Date; - /** Scan results are valid until end time (UTC). */ - endTime?: Date; - /** The number of failed rules with high severity. */ - highSeverityFailedRulesCount?: number; - /** The number of failed rules with medium severity. */ - mediumSeverityFailedRulesCount?: number; - /** The number of failed rules with low severity. */ - lowSeverityFailedRulesCount?: number; - /** The number of total passed rules. */ - totalPassedRulesCount?: number; - /** The number of total failed rules. */ - totalFailedRulesCount?: number; - /** The number of total rules assessed. */ - totalRulesCount?: number; - /** Baseline created for this database, and has one or more rules. */ - isBaselineApplied?: boolean; -} - -/** A list of vulnerability assessment scan records. */ -export interface Scans { - /** List of vulnerability assessment scan records. */ - value?: Scan[]; -} - -/** A vulnerability assessment scan result properties for a single rule. */ -export interface ScanResultProperties { - /** The rule Id. */ - ruleId?: string; - /** The rule result status. */ - status?: RuleStatus; - /** Indicated whether the results specified here are trimmed. */ - isTrimmed?: boolean; - /** The results of the query that was run. */ - queryResults?: string[][]; - /** Remediation details. */ - remediation?: Remediation; - /** The rule result adjusted with baseline. */ - baselineAdjustedResult?: BaselineAdjustedResult; - /** vulnerability assessment rule metadata details. */ - ruleMetadata?: VaRule; -} - -/** Remediation details. */ -export interface Remediation { - /** Remediation description. */ - description?: string; - /** Remediation script. */ - scripts?: string[]; - /** Is remediation automated. */ - automated?: boolean; - /** Optional link to remediate in Azure Portal. */ - portalLink?: string; -} - -/** The rule result adjusted with baseline. */ -export interface BaselineAdjustedResult { - /** Baseline details. */ - baseline?: Baseline; - /** The rule result status. */ - status?: RuleStatus; - /** Results the are not in baseline. */ - resultsNotInBaseline?: string[][]; - /** Results the are in baseline. */ - resultsOnlyInBaseline?: string[][]; -} - -/** Baseline details. */ -export interface Baseline { - /** Expected results. */ - expectedResults?: string[][]; - /** Baseline update time (UTC). */ - updatedTime?: Date; -} - -/** vulnerability assessment rule metadata details. */ -export interface VaRule { - /** The rule Id. */ - ruleId?: string; - /** The rule severity. */ - severity?: RuleSeverity; - /** The rule category. */ - category?: string; - /** The rule type. */ - ruleType?: RuleType; - /** The rule title. */ - title?: string; - /** The rule description. */ - description?: string; - /** The rule rationale. */ - rationale?: string; - /** The rule query details. */ - queryCheck?: QueryCheck; - /** The benchmark references. */ - benchmarkReferences?: BenchmarkReference[]; -} - -/** The rule query details. */ -export interface QueryCheck { - /** The rule query. */ - query?: string; - /** Expected result. */ - expectedResult?: string[][]; - /** Column names of expected result. */ - columnNames?: string[]; -} - -/** The benchmark references. */ -export interface BenchmarkReference { - /** The benchmark name. */ - benchmark?: string; - /** The benchmark reference. */ - reference?: string; -} - -/** A list of vulnerability assessment scan results. */ -export interface ScanResults { - /** List of vulnerability assessment scan results. */ - value?: ScanResult[]; -} - -/** Rule results input. */ -export interface RuleResultsInput { - /** Take results from latest scan. */ - latestScan?: boolean; - /** - * Expected results to be inserted into the baseline. - * Leave this field empty it LatestScan == true. - */ - results?: string[][]; -} - -/** Rule results properties. */ -export interface RuleResultsProperties { - /** Expected results in the baseline. */ - results?: string[][]; -} - -/** A list of rules results. */ -export interface RulesResults { - /** List of rule results. */ - value?: RuleResults[]; -} - -/** Rules results input. */ -export interface RulesResultsInput { - /** Take results from latest scan. */ - latestScan?: boolean; - /** - * Expected results to be inserted into the baseline. - * Leave this field empty it LatestScan == true. - */ - results?: { [propertyName: string]: string[][] }; -} - /** List of security alerts */ export interface AlertList { /** describes security alert properties. */ @@ -1820,10 +1652,10 @@ export interface EnvironmentData { | "AzureDevOpsScope"; } -/** Page of a security governanceRules list */ +/** Page of a governance rules list */ export interface GovernanceRuleList { /** - * Collection of governanceRules in this page + * Collection of governance rules in this page * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: GovernanceRule[]; @@ -1842,30 +1674,54 @@ export interface GovernanceRuleOwnerSource { value?: string; } -/** The governance email weekly notification configuration. */ +/** The governance email weekly notification configuration */ export interface GovernanceRuleEmailNotification { - /** Defines whether manager email notifications are disabled. */ + /** Defines whether manager email notifications are disabled */ disableManagerEmailNotification?: boolean; - /** Defines whether owner email notifications are disabled. */ + /** Defines whether owner email notifications are disabled */ disableOwnerEmailNotification?: boolean; } +/** The governance rule metadata */ +export interface GovernanceRuleMetadata { + /** + * Governance rule Created by object id (GUID) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdBy?: string; + /** + * Governance rule creation date + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdOn?: Date; + /** + * Governance rule last updated by object id (GUID) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedBy?: string; + /** + * Governance rule last update date + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updatedOn?: Date; +} + /** Governance rule execution parameters */ export interface ExecuteGovernanceRuleParams { /** Describe if governance rule should be override */ override?: boolean; } -/** Execute status of Security GovernanceRule over a given scope */ -export interface ExecuteRuleStatus { +/** Long run operation status of governance rule over a given scope */ +export interface OperationResultAutoGenerated { /** - * Unique key for the execution of GovernanceRule + * The status of the long run operation result of governance rule * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationId?: string; + readonly status?: OperationResult; } -/** Page of a security governance assignments list */ +/** Page of a governance assignments list */ export interface GovernanceAssignmentsList { /** * Collection of governance assignments in this page @@ -1887,85 +1743,378 @@ export interface RemediationEta { justification: string; } -/** The governance email weekly notification configuration. */ -export interface GovernanceEmailNotification { - /** Exclude manager from weekly email notification. */ - disableManagerEmailNotification?: boolean; - /** Exclude owner from weekly email notification. */ - disableOwnerEmailNotification?: boolean; +/** The governance email weekly notification configuration. */ +export interface GovernanceEmailNotification { + /** Exclude manager from weekly email notification. */ + disableManagerEmailNotification?: boolean; + /** Exclude owner from weekly email notification. */ + disableOwnerEmailNotification?: boolean; +} + +/** Describe the additional data of governance assignment - optional */ +export interface GovernanceAssignmentAdditionalData { + /** Ticket number associated with this governance assignment */ + ticketNumber?: number; + /** Ticket link associated with this governance assignment - for example: https://snow.com */ + ticketLink?: string; + /** The ticket status associated with this governance assignment - for example: Active */ + ticketStatus?: string; +} + +/** Page of a security applications list */ +export interface ApplicationsList { + /** + * Collection of applications in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Application[]; + /** + * The URI to fetch the next page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Page of a list of API collections as represented by Defender for APIs. */ +export interface ApiCollectionResponseList { + /** + * API collections in this page. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ApiCollectionResponse[]; + /** + * The URI to fetch the next page. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** Page of health reports list */ +export interface HealthReportsList { + /** + * Collection of health reports in this page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: HealthReport[]; + /** + * The URI to fetch the next page + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The resource details of the health report */ +export interface ResourceDetailsAutoGenerated { + /** The status of the health report */ + source?: Source; + /** + * The azure id of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The id of the connector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectorId?: string; +} + +/** The environment details of the resource */ +export interface EnvironmentDetails { + /** The native resource id of the resource (in case of Azure - the resource Id, in case of MC - the native resource id) */ + nativeResourceId?: string; + /** The hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the hierarchyId id) */ + environmentHierarchyId?: string; + /** The organizational hierarchy id of the connector (in case of Azure - the subscription Id, in case of MC - the organizational hierarchyId id) */ + organizationalHierarchyId?: string; + /** The subscription Id */ + subscriptionId?: string; + /** The tenant Id */ + tenantId?: string; +} + +/** The classification of the health report */ +export interface HealthDataClassification { + /** The component describes the name of the agent/service that scans the issue */ + component?: string; + /** The scenario describes the health scenario issue of the component */ + scenario?: string; + /** The resource scope of the health report */ + scope?: ScopeName; +} + +/** The status of the health report */ +export interface StatusAutoGenerated { + /** The status of the health report */ + code?: StatusName; + /** + * The date of when the status of the health report was changed in the last time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusChangeDate?: Date; + /** + * The date of when the resource of the health report was scanned in the first time + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firstEvaluationDate?: Date; +} + +/** The issue that caused the resource to by unhealthy */ +export interface Issue { + /** The unique issue key */ + issueKey: string; + /** The issue name */ + issueName?: string; + /** The affected security values that MDC offers that will be affected by the issue, for example: recommendations, alerts, etc */ + securityValues?: string[]; + /** The issue description */ + issueDescription?: string; + /** Human readable description of what you should do to mitigate this health issue */ + remediationSteps?: string; + /** The remediation script to solve this issue */ + remediationScript?: string; + /** Additional data for the given issue. The additional data depends on the issue type */ + issueAdditionalData?: { [propertyName: string]: string }; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetailAutoGenerated; +} + +/** The error detail. */ +export interface ErrorDetailAutoGenerated { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetailAutoGenerated[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** A vulnerability assessment scan record properties. */ +export interface ScanProperties { + /** The scan trigger type. */ + triggerType?: ScanTriggerType; + /** The scan status. */ + state?: ScanState; + /** The server name. */ + server?: string; + /** The database name. */ + database?: string; + /** The SQL version. */ + sqlVersion?: string; + /** The scan start time (UTC). */ + startTime?: Date; + /** Scan results are valid until end time (UTC). */ + endTime?: Date; + /** The number of failed rules with high severity. */ + highSeverityFailedRulesCount?: number; + /** The number of failed rules with medium severity. */ + mediumSeverityFailedRulesCount?: number; + /** The number of failed rules with low severity. */ + lowSeverityFailedRulesCount?: number; + /** The number of total passed rules. */ + totalPassedRulesCount?: number; + /** The number of total failed rules. */ + totalFailedRulesCount?: number; + /** The number of total rules assessed. */ + totalRulesCount?: number; + /** Baseline created for this database, and has one or more rules. */ + isBaselineApplied?: boolean; + /** Last scan time. */ + lastScanTime?: Date; +} + +/** A list of vulnerability assessment scan records. */ +export interface Scans { + /** List of vulnerability assessment scan records. */ + value?: Scan[]; +} + +/** A vulnerability assessment scan result properties for a single rule. */ +export interface ScanResultProperties { + /** The rule Id. */ + ruleId?: string; + /** The rule result status. */ + status?: RuleStatus; + /** Indicated whether the results specified here are trimmed. */ + isTrimmed?: boolean; + /** The results of the query that was run. */ + queryResults?: string[][]; + /** Remediation details. */ + remediation?: Remediation; + /** The rule result adjusted with baseline. */ + baselineAdjustedResult?: BaselineAdjustedResult; + /** vulnerability assessment rule metadata details. */ + ruleMetadata?: VaRule; +} + +/** Remediation details. */ +export interface Remediation { + /** Remediation description. */ + description?: string; + /** Remediation script. */ + scripts?: string[]; + /** Is remediation automated. */ + automated?: boolean; + /** Optional link to remediate in Azure Portal. */ + portalLink?: string; +} + +/** The rule result adjusted with baseline. */ +export interface BaselineAdjustedResult { + /** Baseline details. */ + baseline?: Baseline; + /** The rule result status. */ + status?: RuleStatus; + /** Results the are not in baseline. */ + resultsNotInBaseline?: string[][]; + /** Results the are in baseline. */ + resultsOnlyInBaseline?: string[][]; +} + +/** Baseline details. */ +export interface Baseline { + /** Expected results. */ + expectedResults?: string[][]; + /** Baseline update time (UTC). */ + updatedTime?: Date; +} + +/** vulnerability assessment rule metadata details. */ +export interface VaRule { + /** The rule Id. */ + ruleId?: string; + /** The rule severity. */ + severity?: RuleSeverity; + /** The rule category. */ + category?: string; + /** The rule type. */ + ruleType?: RuleType; + /** The rule title. */ + title?: string; + /** The rule description. */ + description?: string; + /** The rule rationale. */ + rationale?: string; + /** The rule query details. */ + queryCheck?: QueryCheck; + /** The benchmark references. */ + benchmarkReferences?: BenchmarkReference[]; +} + +/** The rule query details. */ +export interface QueryCheck { + /** The rule query. */ + query?: string; + /** Expected result. */ + expectedResult?: string[][]; + /** Column names of expected result. */ + columnNames?: string[]; +} + +/** The benchmark references. */ +export interface BenchmarkReference { + /** The benchmark name. */ + benchmark?: string; + /** The benchmark reference. */ + reference?: string; } -/** Describe the additional data of GovernanceAssignment - optional */ -export interface GovernanceAssignmentAdditionalData { - /** Ticket number associated with this GovernanceAssignment */ - ticketNumber?: number; - /** Ticket link associated with this GovernanceAssignment - for example: https://snow.com */ - ticketLink?: string; - /** The ticket status associated with this GovernanceAssignment - for example: Active */ - ticketStatus?: string; +/** A list of vulnerability assessment scan results. */ +export interface ScanResults { + /** List of vulnerability assessment scan results. */ + value?: ScanResult[]; } -/** Page of a security applications list */ -export interface ApplicationsList { - /** - * Collection of applications in this page - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Application[]; +/** Rule results input. */ +export interface RuleResultsInput { + /** Take results from latest scan. */ + latestScan?: boolean; /** - * The URI to fetch the next page - * NOTE: This property will not be serialized. It can only be populated by the server. + * Expected results to be inserted into the baseline. + * Leave this field empty it LatestScan == true. */ - readonly nextLink?: string; + results?: string[][]; } -/** Page of a list of API collections as represented by Defender for APIs. */ -export interface ApiCollectionResponseList { - /** - * API collections in this page. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiCollectionResponse[]; - /** - * The URI to fetch the next page. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** Rule results properties. */ +export interface RuleResultsProperties { + /** Expected results in the baseline. */ + results?: string[][]; } -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; +/** A list of rules results. */ +export interface RulesResults { + /** List of rule results. */ + value?: RuleResults[]; } -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; +/** Rules results input. */ +export interface RulesResultsInput { + /** Take results from latest scan. */ + latestScan?: boolean; /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. + * Expected results to be inserted into the baseline. + * Leave this field empty it LatestScan == true. */ - readonly additionalInfo?: ErrorAdditionalInfo[]; + results?: { [propertyName: string]: string[][] }; } /** CVSS details */ @@ -3192,24 +3341,6 @@ export interface ConnectorSetting extends Resource { authenticationDetails?: AuthenticationDetailsPropertiesUnion; } -/** A vulnerability assessment scan record. */ -export interface Scan extends Resource { - /** A vulnerability assessment scan record properties. */ - properties?: ScanProperties; -} - -/** A vulnerability assessment scan result for a single rule. */ -export interface ScanResult extends Resource { - /** A vulnerability assessment scan result properties for a single rule. */ - properties?: ScanResultProperties; -} - -/** Rule results. */ -export interface RuleResults extends Resource { - /** Rule results properties. */ - properties?: RuleResultsProperties; -} - /** Security alert */ export interface Alert extends Resource { /** @@ -3298,7 +3429,7 @@ export interface Alert extends Resource { */ readonly timeGeneratedUtc?: Date; /** - * The name of the product which published this alert (Azure Security Center, Azure ATP, Microsoft Defender ATP, O365 ATP, MCAS, and so on). + * The name of the product which published this alert (Microsoft Sentinel, Microsoft Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for Cloud Apps, and so on). * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly productName?: string; @@ -3377,17 +3508,22 @@ export interface Software extends Resource { firstSeenAt?: string; } -/** Security GovernanceRule over a given scope */ +/** Governance rule over a given scope */ export interface GovernanceRule extends Resource { - /** display name of the governanceRule */ + /** + * The tenantId (GUID) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Display name of the governance rule */ displayName?: string; - /** description of the governanceRule */ + /** Description of the governance rule */ description?: string; /** Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days */ remediationTimeframe?: string; /** Defines whether there is a grace period on the governance rule */ isGracePeriod?: boolean; - /** The governance rule priority, priority to the lower number. Rules with the same priority on the same subscription will not be allowed */ + /** The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed */ rulePriority?: number; /** Defines whether the rule is active/inactive */ isDisabled?: boolean; @@ -3395,15 +3531,21 @@ export interface GovernanceRule extends Resource { ruleType?: GovernanceRuleType; /** The governance rule source, what the rule affects, e.g. Assessments */ sourceResourceType?: GovernanceRuleSourceResourceType; + /** Excluded scopes, filter out the descendants of the scope (on management scopes) */ + excludedScopes?: string[]; /** The governance rule conditionSets - see examples */ conditionSets?: Record[]; - /** The Owner source for the governance rule - e.g. Manually by user@contoso.com - see example */ + /** Defines whether the rule is management scope rule (master connector as a single scope or management scope) */ + includeMemberScopes?: boolean; + /** The owner source for the governance rule - e.g. Manually by user@contoso.com - see example */ ownerSource?: GovernanceRuleOwnerSource; /** The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners */ governanceEmailNotification?: GovernanceRuleEmailNotification; + /** The governance rule metadata */ + metadata?: GovernanceRuleMetadata; } -/** Security GovernanceAssignment over a given scope */ +/** Governance assignment over a given scope */ export interface GovernanceAssignment extends Resource { /** The Owner for the governance assignment - e.g. user@contoso.com - see example */ owner?: string; @@ -3439,6 +3581,40 @@ export interface ApiCollectionResponse extends Resource { additionalData?: { [propertyName: string]: string }; } +/** The health report resource */ +export interface HealthReport extends Resource { + /** The resource details of the health report */ + resourceDetails?: ResourceDetailsAutoGenerated; + /** The environment details of the resource */ + environmentDetails?: EnvironmentDetails; + /** The classification of the health report */ + healthDataClassification?: HealthDataClassification; + /** The status of the health report */ + status?: StatusAutoGenerated; + /** The affected defenders plans by unhealthy report */ + affectedDefendersPlans?: string[]; + /** A collection of the issues in the report */ + issues?: Issue[]; +} + +/** A vulnerability assessment scan record. */ +export interface Scan extends Resource { + /** A vulnerability assessment scan record properties. */ + properties?: ScanProperties; +} + +/** A vulnerability assessment scan result for a single rule. */ +export interface ScanResult extends Resource { + /** A vulnerability assessment scan result properties for a single rule. */ + properties?: ScanResultProperties; +} + +/** Rule results. */ +export interface RuleResults extends Resource { + /** Rule results properties. */ + properties?: RuleResultsProperties; +} + /** Security assessment metadata */ export interface SecurityAssessmentMetadata extends Resource { /** User friendly display name of the assessment */ @@ -4331,26 +4507,20 @@ export interface ProcessNotAllowed extends AllowlistCustomAlertRule { ruleType: "ProcessNotAllowed"; } -/** Defines headers for GovernanceRules_ruleIdExecuteSingleSubscription operation. */ -export interface GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders { - /** Location URL for the execution status */ - location?: string; -} - -/** Defines headers for GovernanceRules_ruleIdExecuteSingleSecurityConnector operation. */ -export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders { - /** Location URL for the execution status */ +/** Defines headers for GovernanceRules_delete operation. */ +export interface GovernanceRulesDeleteHeaders { + /** Location URL for the deletion status */ location?: string; } -/** Defines headers for SubscriptionGovernanceRulesExecuteStatus_get operation. */ -export interface SubscriptionGovernanceRulesExecuteStatusGetHeaders { +/** Defines headers for GovernanceRules_execute operation. */ +export interface GovernanceRulesExecuteHeaders { /** Location URL for the execution status */ location?: string; } -/** Defines headers for SecurityConnectorGovernanceRulesExecuteStatus_get operation. */ -export interface SecurityConnectorGovernanceRulesExecuteStatusGetHeaders { +/** Defines headers for GovernanceRules_operationResults operation. */ +export interface GovernanceRulesOperationResultsHeaders { /** Location URL for the execution status */ location?: string; } @@ -4462,7 +4632,7 @@ export type PricingTier = string; /** Known values of {@link ValueType} that the service accepts. */ export enum KnownValueType { - /** An IP range in CIDR format (e.g. '192.168.0.1/8'). */ + /** An IP range in CIDR format (e.g. '192.168.0.1\/8'). */ IpCidr = "IpCidr", /** Any string value. */ String = "String" @@ -4548,13 +4718,13 @@ export enum KnownRecommendationType { IoTIpfilterPermissiveRule = "IoT_IPFilter_PermissiveRule", /** A listening endpoint was found on the device. */ IoTOpenPorts = "IoT_OpenPorts", - /** An Allowed firewall policy was found (INPUT/OUTPUT). The policy should Deny all traffic by default and define rules to allow necessary communication to/from the device. */ + /** An Allowed firewall policy was found (INPUT\/OUTPUT). The policy should Deny all traffic by default and define rules to allow necessary communication to\/from the device. */ IoTPermissiveFirewallPolicy = "IoT_PermissiveFirewallPolicy", /** A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. */ IoTPermissiveInputFirewallRules = "IoT_PermissiveInputFirewallRules", /** A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. */ IoTPermissiveOutputFirewallRules = "IoT_PermissiveOutputFirewallRules", - /** Edge module is configured to run in privileged mode, with extensive Linux capabilities or with host-level network access (send/receive data to host machine). */ + /** Edge module is configured to run in privileged mode, with extensive Linux capabilities or with host-level network access (send\/receive data to host machine). */ IoTPrivilegedDockerOptions = "IoT_PrivilegedDockerOptions", /** Same authentication credentials to the IoT Hub used by multiple devices. This could indicate an illegitimate device impersonating a legitimate device. It also exposes the risk of device impersonation by an attacker. */ IoTSharedCredentials = "IoT_SharedCredentials", @@ -6021,199 +6191,85 @@ export enum KnownHybridComputeProvisioningState { Expired = "Expired" } -/** - * Defines values for HybridComputeProvisioningState. \ - * {@link KnownHybridComputeProvisioningState} can be used interchangeably with HybridComputeProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Valid**: Valid service principal details. \ - * **Invalid**: Invalid service principal details. \ - * **Expired**: the service principal details are expired - */ -export type HybridComputeProvisioningState = string; - -/** Known values of {@link AuthenticationProvisioningState} that the service accepts. */ -export enum KnownAuthenticationProvisioningState { - /** Valid connector */ - Valid = "Valid", - /** Invalid connector */ - Invalid = "Invalid", - /** the connection has expired */ - Expired = "Expired", - /** Incorrect policy of the connector */ - IncorrectPolicy = "IncorrectPolicy" -} - -/** - * Defines values for AuthenticationProvisioningState. \ - * {@link KnownAuthenticationProvisioningState} can be used interchangeably with AuthenticationProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Valid**: Valid connector \ - * **Invalid**: Invalid connector \ - * **Expired**: the connection has expired \ - * **IncorrectPolicy**: Incorrect policy of the connector - */ -export type AuthenticationProvisioningState = string; - -/** Known values of {@link PermissionProperty} that the service accepts. */ -export enum KnownPermissionProperty { - /** This permission provides read only access to AWS Security Hub resources. */ - AWSAWSSecurityHubReadOnlyAccess = "AWS::AWSSecurityHubReadOnlyAccess", - /** This permission grants access to read security configuration metadata. */ - AWSSecurityAudit = "AWS::SecurityAudit", - /** The permission provides for EC2 Automation service to execute activities defined within Automation documents. */ - AWSAmazonSSMAutomationRole = "AWS::AmazonSSMAutomationRole", - /** This permission provides read only access to GCP Security Command Center. */ - GCPSecurityCenterAdminViewer = "GCP::Security Center Admin Viewer" -} - -/** - * Defines values for PermissionProperty. \ - * {@link KnownPermissionProperty} can be used interchangeably with PermissionProperty, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AWS::AWSSecurityHubReadOnlyAccess**: This permission provides read only access to AWS Security Hub resources. \ - * **AWS::SecurityAudit**: This permission grants access to read security configuration metadata. \ - * **AWS::AmazonSSMAutomationRole**: The permission provides for EC2 Automation service to execute activities defined within Automation documents. \ - * **GCP::Security Center Admin Viewer**: This permission provides read only access to GCP Security Command Center. - */ -export type PermissionProperty = string; - -/** Known values of {@link AuthenticationType} that the service accepts. */ -export enum KnownAuthenticationType { - /** AWS cloud account connector user credentials authentication */ - AwsCreds = "awsCreds", - /** AWS account connector assume role authentication */ - AwsAssumeRole = "awsAssumeRole", - /** GCP account connector service to service authentication */ - GcpCredentials = "gcpCredentials" -} - -/** - * Defines values for AuthenticationType. \ - * {@link KnownAuthenticationType} can be used interchangeably with AuthenticationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **awsCreds**: AWS cloud account connector user credentials authentication \ - * **awsAssumeRole**: AWS account connector assume role authentication \ - * **gcpCredentials**: GCP account connector service to service authentication - */ -export type AuthenticationType = string; - -/** Known values of {@link ScanTriggerType} that the service accepts. */ -export enum KnownScanTriggerType { - /** OnDemand */ - OnDemand = "OnDemand", - /** Recurring */ - Recurring = "Recurring" -} - -/** - * Defines values for ScanTriggerType. \ - * {@link KnownScanTriggerType} can be used interchangeably with ScanTriggerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **OnDemand**: OnDemand \ - * **Recurring**: Recurring - */ -export type ScanTriggerType = string; - -/** Known values of {@link ScanState} that the service accepts. */ -export enum KnownScanState { - /** Failed */ - Failed = "Failed", - /** FailedToRun */ - FailedToRun = "FailedToRun", - /** InProgress */ - InProgress = "InProgress", - /** Passed */ - Passed = "Passed" -} - -/** - * Defines values for ScanState. \ - * {@link KnownScanState} can be used interchangeably with ScanState, +/** + * Defines values for HybridComputeProvisioningState. \ + * {@link KnownHybridComputeProvisioningState} can be used interchangeably with HybridComputeProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Failed**: Failed \ - * **FailedToRun**: FailedToRun \ - * **InProgress**: InProgress \ - * **Passed**: Passed + * **Valid**: Valid service principal details. \ + * **Invalid**: Invalid service principal details. \ + * **Expired**: the service principal details are expired */ -export type ScanState = string; +export type HybridComputeProvisioningState = string; -/** Known values of {@link RuleStatus} that the service accepts. */ -export enum KnownRuleStatus { - /** NonFinding */ - NonFinding = "NonFinding", - /** Finding */ - Finding = "Finding", - /** InternalError */ - InternalError = "InternalError" +/** Known values of {@link AuthenticationProvisioningState} that the service accepts. */ +export enum KnownAuthenticationProvisioningState { + /** Valid connector */ + Valid = "Valid", + /** Invalid connector */ + Invalid = "Invalid", + /** the connection has expired */ + Expired = "Expired", + /** Incorrect policy of the connector */ + IncorrectPolicy = "IncorrectPolicy" } /** - * Defines values for RuleStatus. \ - * {@link KnownRuleStatus} can be used interchangeably with RuleStatus, + * Defines values for AuthenticationProvisioningState. \ + * {@link KnownAuthenticationProvisioningState} can be used interchangeably with AuthenticationProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NonFinding**: NonFinding \ - * **Finding**: Finding \ - * **InternalError**: InternalError + * **Valid**: Valid connector \ + * **Invalid**: Invalid connector \ + * **Expired**: the connection has expired \ + * **IncorrectPolicy**: Incorrect policy of the connector */ -export type RuleStatus = string; +export type AuthenticationProvisioningState = string; -/** Known values of {@link RuleSeverity} that the service accepts. */ -export enum KnownRuleSeverity { - /** High */ - High = "High", - /** Medium */ - Medium = "Medium", - /** Low */ - Low = "Low", - /** Informational */ - Informational = "Informational", - /** Obsolete */ - Obsolete = "Obsolete" +/** Known values of {@link PermissionProperty} that the service accepts. */ +export enum KnownPermissionProperty { + /** This permission provides read only access to AWS Security Hub resources. */ + AWSAWSSecurityHubReadOnlyAccess = "AWS::AWSSecurityHubReadOnlyAccess", + /** This permission grants access to read security configuration metadata. */ + AWSSecurityAudit = "AWS::SecurityAudit", + /** The permission provides for EC2 Automation service to execute activities defined within Automation documents. */ + AWSAmazonSSMAutomationRole = "AWS::AmazonSSMAutomationRole", + /** This permission provides read only access to GCP Security Command Center. */ + GCPSecurityCenterAdminViewer = "GCP::Security Center Admin Viewer" } /** - * Defines values for RuleSeverity. \ - * {@link KnownRuleSeverity} can be used interchangeably with RuleSeverity, + * Defines values for PermissionProperty. \ + * {@link KnownPermissionProperty} can be used interchangeably with PermissionProperty, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **High**: High \ - * **Medium**: Medium \ - * **Low**: Low \ - * **Informational**: Informational \ - * **Obsolete**: Obsolete + * **AWS::AWSSecurityHubReadOnlyAccess**: This permission provides read only access to AWS Security Hub resources. \ + * **AWS::SecurityAudit**: This permission grants access to read security configuration metadata. \ + * **AWS::AmazonSSMAutomationRole**: The permission provides for EC2 Automation service to execute activities defined within Automation documents. \ + * **GCP::Security Center Admin Viewer**: This permission provides read only access to GCP Security Command Center. */ -export type RuleSeverity = string; +export type PermissionProperty = string; -/** Known values of {@link RuleType} that the service accepts. */ -export enum KnownRuleType { - /** Binary */ - Binary = "Binary", - /** BaselineExpected */ - BaselineExpected = "BaselineExpected", - /** PositiveList */ - PositiveList = "PositiveList", - /** NegativeList */ - NegativeList = "NegativeList" +/** Known values of {@link AuthenticationType} that the service accepts. */ +export enum KnownAuthenticationType { + /** AWS cloud account connector user credentials authentication */ + AwsCreds = "awsCreds", + /** AWS account connector assume role authentication */ + AwsAssumeRole = "awsAssumeRole", + /** GCP account connector service to service authentication */ + GcpCredentials = "gcpCredentials" } /** - * Defines values for RuleType. \ - * {@link KnownRuleType} can be used interchangeably with RuleType, + * Defines values for AuthenticationType. \ + * {@link KnownAuthenticationType} can be used interchangeably with AuthenticationType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Binary**: Binary \ - * **BaselineExpected**: BaselineExpected \ - * **PositiveList**: PositiveList \ - * **NegativeList**: NegativeList + * **awsCreds**: AWS cloud account connector user credentials authentication \ + * **awsAssumeRole**: AWS account connector assume role authentication \ + * **gcpCredentials**: GCP account connector service to service authentication */ -export type RuleType = string; +export type AuthenticationType = string; /** Known values of {@link AlertSeverity} that the service accepts. */ export enum KnownAlertSeverity { @@ -6243,7 +6299,7 @@ export type AlertSeverity = string; export enum KnownIntent { /** Unknown */ Unknown = "Unknown", - /** PreAttack could be either an attempt to access a certain resource regardless of a malicious intent, or a failed attempt to gain access to a target system to gather information prior to exploitation. This step is usually detected as an attempt, originating from outside the network, to scan the target system and find a way in. Further details on the PreAttack stage can be read in [MITRE Pre-Att&ck matrix](https://attack.mitre.org/matrices/pre/). */ + /** PreAttack could be either an attempt to access a certain resource regardless of a malicious intent, or a failed attempt to gain access to a target system to gather information prior to exploitation. This step is usually detected as an attempt, originating from outside the network, to scan the target system and find a way in. Further details on the PreAttack stage can be read in [MITRE Pre-Att&ck matrix](https:\//attack.mitre.org\/matrices\/pre\/). */ PreAttack = "PreAttack", /** InitialAccess is the stage where an attacker manages to get foothold on the attacked resource. */ InitialAccess = "InitialAccess", @@ -6590,6 +6646,27 @@ export enum KnownGovernanceRuleOwnerSourceType { */ export type GovernanceRuleOwnerSourceType = string; +/** Known values of {@link OperationResult} that the service accepts. */ +export enum KnownOperationResult { + /** The operation succeeded */ + Succeeded = "Succeeded", + /** The operation failed */ + Failed = "Failed", + /** The operation canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for OperationResult. \ + * {@link KnownOperationResult} can be used interchangeably with OperationResult, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The operation succeeded \ + * **Failed**: The operation failed \ + * **Canceled**: The operation canceled + */ +export type OperationResult = string; + /** Known values of {@link ApplicationSourceResourceType} that the service accepts. */ export enum KnownApplicationSourceResourceType { /** The source of the application is assessments */ @@ -6605,6 +6682,165 @@ export enum KnownApplicationSourceResourceType { */ export type ApplicationSourceResourceType = string; +/** Known values of {@link ScopeName} that the service accepts. */ +export enum KnownScopeName { + /** Connectors */ + Connectors = "Connectors", + /** Clusters */ + Clusters = "Clusters", + /** VirtualMachines */ + VirtualMachines = "VirtualMachines", + /** Unknown */ + Unknown = "Unknown" +} + +/** + * Defines values for ScopeName. \ + * {@link KnownScopeName} can be used interchangeably with ScopeName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connectors** \ + * **Clusters** \ + * **VirtualMachines** \ + * **Unknown** + */ +export type ScopeName = string; + +/** Known values of {@link StatusName} that the service accepts. */ +export enum KnownStatusName { + /** Healthy */ + Healthy = "Healthy", + /** NotHealthy */ + NotHealthy = "NotHealthy", + /** NotApplicable */ + NotApplicable = "NotApplicable" +} + +/** + * Defines values for StatusName. \ + * {@link KnownStatusName} can be used interchangeably with StatusName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Healthy** \ + * **NotHealthy** \ + * **NotApplicable** + */ +export type StatusName = string; + +/** Known values of {@link ScanTriggerType} that the service accepts. */ +export enum KnownScanTriggerType { + /** OnDemand */ + OnDemand = "OnDemand", + /** Recurring */ + Recurring = "Recurring" +} + +/** + * Defines values for ScanTriggerType. \ + * {@link KnownScanTriggerType} can be used interchangeably with ScanTriggerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OnDemand**: OnDemand \ + * **Recurring**: Recurring + */ +export type ScanTriggerType = string; + +/** Known values of {@link ScanState} that the service accepts. */ +export enum KnownScanState { + /** Failed */ + Failed = "Failed", + /** FailedToRun */ + FailedToRun = "FailedToRun", + /** InProgress */ + InProgress = "InProgress", + /** Passed */ + Passed = "Passed" +} + +/** + * Defines values for ScanState. \ + * {@link KnownScanState} can be used interchangeably with ScanState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Failed**: Failed \ + * **FailedToRun**: FailedToRun \ + * **InProgress**: InProgress \ + * **Passed**: Passed + */ +export type ScanState = string; + +/** Known values of {@link RuleStatus} that the service accepts. */ +export enum KnownRuleStatus { + /** NonFinding */ + NonFinding = "NonFinding", + /** Finding */ + Finding = "Finding", + /** InternalError */ + InternalError = "InternalError" +} + +/** + * Defines values for RuleStatus. \ + * {@link KnownRuleStatus} can be used interchangeably with RuleStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NonFinding**: NonFinding \ + * **Finding**: Finding \ + * **InternalError**: InternalError + */ +export type RuleStatus = string; + +/** Known values of {@link RuleSeverity} that the service accepts. */ +export enum KnownRuleSeverity { + /** High */ + High = "High", + /** Medium */ + Medium = "Medium", + /** Low */ + Low = "Low", + /** Informational */ + Informational = "Informational", + /** Obsolete */ + Obsolete = "Obsolete" +} + +/** + * Defines values for RuleSeverity. \ + * {@link KnownRuleSeverity} can be used interchangeably with RuleSeverity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **High**: High \ + * **Medium**: Medium \ + * **Low**: Low \ + * **Informational**: Informational \ + * **Obsolete**: Obsolete + */ +export type RuleSeverity = string; + +/** Known values of {@link RuleType} that the service accepts. */ +export enum KnownRuleType { + /** Binary */ + Binary = "Binary", + /** BaselineExpected */ + BaselineExpected = "BaselineExpected", + /** PositiveList */ + PositiveList = "PositiveList", + /** NegativeList */ + NegativeList = "NegativeList" +} + +/** + * Defines values for RuleType. \ + * {@link KnownRuleType} can be used interchangeably with RuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Binary**: Binary \ + * **BaselineExpected**: BaselineExpected \ + * **PositiveList**: PositiveList \ + * **NegativeList**: NegativeList + */ +export type RuleType = string; + /** Known values of {@link AadConnectivityState} that the service accepts. */ export enum KnownAadConnectivityState { /** Discovered */ @@ -7018,20 +7254,14 @@ export interface IotSecuritySolutionDeleteOptionalParams /** Optional parameters. */ export interface IotSecuritySolutionListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type IotSecuritySolutionListBySubscriptionNextResponse = IoTSecuritySolutionsList; /** Optional parameters. */ export interface IotSecuritySolutionListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** Filter the IoT Security solution with OData syntax. Supports filtering by iotHubs. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type IotSecuritySolutionListByResourceGroupNextResponse = IoTSecuritySolutionsList; @@ -7073,10 +7303,7 @@ export interface IotSecuritySolutionsAnalyticsAggregatedAlertDismissOptionalPara /** Optional parameters. */ export interface IotSecuritySolutionsAnalyticsAggregatedAlertListNextOptionalParams - extends coreClient.OperationOptions { - /** Number of results to retrieve. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type IotSecuritySolutionsAnalyticsAggregatedAlertListNextResponse = IoTSecurityAggregatedAlertList; @@ -7100,10 +7327,7 @@ export type IotSecuritySolutionsAnalyticsRecommendationListResponse = IoTSecurit /** Optional parameters. */ export interface IotSecuritySolutionsAnalyticsRecommendationListNextOptionalParams - extends coreClient.OperationOptions { - /** Number of results to retrieve. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type IotSecuritySolutionsAnalyticsRecommendationListNextResponse = IoTSecurityAggregatedRecommendationList; @@ -7196,30 +7420,21 @@ export interface TasksUpdateResourceGroupLevelTaskStateOptionalParams /** Optional parameters. */ export interface TasksListNextOptionalParams - extends coreClient.OperationOptions { - /** OData filter. Optional. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type TasksListNextResponse = SecurityTaskList; /** Optional parameters. */ export interface TasksListByHomeRegionNextOptionalParams - extends coreClient.OperationOptions { - /** OData filter. Optional. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByHomeRegionNext operation. */ export type TasksListByHomeRegionNextResponse = SecurityTaskList; /** Optional parameters. */ export interface TasksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** OData filter. Optional. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type TasksListByResourceGroupNextResponse = SecurityTaskList; @@ -7391,10 +7606,7 @@ export type RegulatoryComplianceStandardsGetResponse = RegulatoryComplianceStand /** Optional parameters. */ export interface RegulatoryComplianceStandardsListNextOptionalParams - extends coreClient.OperationOptions { - /** OData filter. Optional. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RegulatoryComplianceStandardsListNextResponse = RegulatoryComplianceStandardList; @@ -7418,10 +7630,7 @@ export type RegulatoryComplianceControlsGetResponse = RegulatoryComplianceContro /** Optional parameters. */ export interface RegulatoryComplianceControlsListNextOptionalParams - extends coreClient.OperationOptions { - /** OData filter. Optional. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RegulatoryComplianceControlsListNextResponse = RegulatoryComplianceControlList; @@ -7445,10 +7654,7 @@ export type RegulatoryComplianceAssessmentsGetResponse = RegulatoryComplianceAss /** Optional parameters. */ export interface RegulatoryComplianceAssessmentsListNextOptionalParams - extends coreClient.OperationOptions { - /** OData filter. Optional. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RegulatoryComplianceAssessmentsListNextResponse = RegulatoryComplianceAssessmentList; @@ -7571,10 +7777,7 @@ export interface AlertsSuppressionRulesDeleteOptionalParams /** Optional parameters. */ export interface AlertsSuppressionRulesListNextOptionalParams - extends coreClient.OperationOptions { - /** Type of the alert to get rules for */ - alertType?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type AlertsSuppressionRulesListNextResponse = AlertsSuppressionRulesList; @@ -8035,20 +8238,14 @@ export type SecureScoreControlsListResponse = SecureScoreControlList; /** Optional parameters. */ export interface SecureScoreControlsListBySecureScoreNextOptionalParams - extends coreClient.OperationOptions { - /** OData expand. Optional. */ - expand?: ExpandControlsEnum; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySecureScoreNext operation. */ export type SecureScoreControlsListBySecureScoreNextResponse = SecureScoreControlList; /** Optional parameters. */ export interface SecureScoreControlsListNextOptionalParams - extends coreClient.OperationOptions { - /** OData expand. Optional. */ - expand?: ExpandControlsEnum; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type SecureScoreControlsListNextResponse = SecureScoreControlList; @@ -8134,72 +8331,6 @@ export interface ConnectorsListNextOptionalParams /** Contains response data for the listNext operation. */ export type ConnectorsListNextResponse = ConnectorSettingList; -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentScansGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SqlVulnerabilityAssessmentScansGetResponse = Scan; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentScansListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SqlVulnerabilityAssessmentScansListResponse = Scans; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentScanResultsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SqlVulnerabilityAssessmentScanResultsGetResponse = ScanResult; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentScanResultsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SqlVulnerabilityAssessmentScanResultsListResponse = ScanResults; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** The baseline results for this rule. */ - body?: RuleResultsInput; -} - -/** Contains response data for the createOrUpdate operation. */ -export type SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateResponse = RuleResults; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentBaselineRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SqlVulnerabilityAssessmentBaselineRulesGetResponse = RuleResults; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentBaselineRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentBaselineRulesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SqlVulnerabilityAssessmentBaselineRulesListResponse = RulesResults; - -/** Optional parameters. */ -export interface SqlVulnerabilityAssessmentBaselineRulesAddOptionalParams - extends coreClient.OperationOptions { - /** The baseline rules. */ - body?: RulesResultsInput; -} - -/** Contains response data for the add operation. */ -export type SqlVulnerabilityAssessmentBaselineRulesAddResponse = RulesResults; - /** Optional parameters. */ export interface AlertsListOptionalParams extends coreClient.OperationOptions {} @@ -8473,18 +8604,11 @@ export interface SecurityConnectorsListByResourceGroupNextOptionalParams export type SecurityConnectorsListByResourceGroupNextResponse = SecurityConnectorsList; /** Optional parameters. */ -export interface GovernanceRuleListOptionalParams +export interface GovernanceRulesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type GovernanceRuleListResponse = GovernanceRuleList; - -/** Optional parameters. */ -export interface GovernanceRuleListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type GovernanceRuleListNextResponse = GovernanceRuleList; +export type GovernanceRulesListResponse = GovernanceRuleList; /** Optional parameters. */ export interface GovernanceRulesGetOptionalParams @@ -8502,26 +8626,17 @@ export type GovernanceRulesCreateOrUpdateResponse = GovernanceRule; /** Optional parameters. */ export interface GovernanceRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams extends coreClient.OperationOptions { - /** GovernanceRule over a subscription scope */ - executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ resumeFrom?: string; } -/** Contains response data for the ruleIdExecuteSingleSubscription operation. */ -export type GovernanceRulesRuleIdExecuteSingleSubscriptionResponse = GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders; - /** Optional parameters. */ -export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams +export interface GovernanceRulesExecuteOptionalParams extends coreClient.OperationOptions { - /** GovernanceRule over a subscription scope */ + /** Execute governance rule over a given scope */ executeGovernanceRuleParams?: ExecuteGovernanceRuleParams; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -8529,64 +8644,22 @@ export interface GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalPara resumeFrom?: string; } -/** Contains response data for the ruleIdExecuteSingleSecurityConnector operation. */ -export type GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse = GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders; +/** Contains response data for the execute operation. */ +export type GovernanceRulesExecuteResponse = GovernanceRulesExecuteHeaders; /** Optional parameters. */ -export interface SecurityConnectorGovernanceRuleListOptionalParams +export interface GovernanceRulesOperationResultsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type SecurityConnectorGovernanceRuleListResponse = GovernanceRuleList; +/** Contains response data for the operationResults operation. */ +export type GovernanceRulesOperationResultsResponse = OperationResultAutoGenerated; /** Optional parameters. */ -export interface SecurityConnectorGovernanceRuleListNextOptionalParams +export interface GovernanceRulesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type SecurityConnectorGovernanceRuleListNextResponse = GovernanceRuleList; - -/** Optional parameters. */ -export interface SecurityConnectorGovernanceRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SecurityConnectorGovernanceRulesGetResponse = GovernanceRule; - -/** Optional parameters. */ -export interface SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SecurityConnectorGovernanceRulesCreateOrUpdateResponse = GovernanceRule; - -/** Optional parameters. */ -export interface SecurityConnectorGovernanceRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SubscriptionGovernanceRulesExecuteStatusGetOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the get operation. */ -export type SubscriptionGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; - -/** Optional parameters. */ -export interface SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the get operation. */ -export type SecurityConnectorGovernanceRulesExecuteStatusGetResponse = ExecuteRuleStatus; +export type GovernanceRulesListNextResponse = GovernanceRuleList; /** Optional parameters. */ export interface GovernanceAssignmentsListOptionalParams @@ -8716,6 +8789,93 @@ export type APICollectionOnboardingCreateResponse = ApiCollectionResponse; export interface APICollectionOffboardingDeleteOptionalParams extends coreClient.OperationOptions {} +/** Optional parameters. */ +export interface HealthReportsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type HealthReportsListResponse = HealthReportsList; + +/** Optional parameters. */ +export interface HealthReportsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type HealthReportsListNextResponse = HealthReportsList; + +/** Optional parameters. */ +export interface HealthReportGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type HealthReportGetResponse = HealthReport; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentScansGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentScansGetResponse = Scan; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentScansListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SqlVulnerabilityAssessmentScansListResponse = Scans; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentScanResultsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentScanResultsGetResponse = ScanResult; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentScanResultsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SqlVulnerabilityAssessmentScanResultsListResponse = ScanResults; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** The baseline results for this rule. */ + body?: RuleResultsInput; +} + +/** Contains response data for the createOrUpdate operation. */ +export type SqlVulnerabilityAssessmentBaselineRulesCreateOrUpdateResponse = RuleResults; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentBaselineRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentBaselineRulesGetResponse = RuleResults; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentBaselineRulesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentBaselineRulesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SqlVulnerabilityAssessmentBaselineRulesListResponse = RulesResults; + +/** Optional parameters. */ +export interface SqlVulnerabilityAssessmentBaselineRulesAddOptionalParams + extends coreClient.OperationOptions { + /** The baseline rules. */ + body?: RulesResultsInput; +} + +/** Contains response data for the add operation. */ +export type SqlVulnerabilityAssessmentBaselineRulesAddResponse = RulesResults; + /** Optional parameters. */ export interface SecurityCenterOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/security/arm-security/src/models/mappers.ts b/sdk/security/arm-security/src/models/mappers.ts index b4ba00cdc7ad..bca7373c89b6 100644 --- a/sdk/security/arm-security/src/models/mappers.ts +++ b/sdk/security/arm-security/src/models/mappers.ts @@ -3551,112 +3551,215 @@ export const AuthenticationDetailsProperties: coreClient.CompositeMapper = { } }; -export const ScanProperties: coreClient.CompositeMapper = { +export const AlertList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScanProperties", + className: "AlertList", modelProperties: { - triggerType: { - serializedName: "triggerType", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alert" + } + } } }, - state: { - serializedName: "state", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - server: { - serializedName: "server", + } + } + } +}; + +export const ResourceIdentifier: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceIdentifier", + uberParent: "ResourceIdentifier", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, type: { name: "String" } - }, - database: { - serializedName: "database", + } + } + } +}; + +export const AlertEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AlertEntity", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - }, - sqlVersion: { - serializedName: "sqlVersion", + } + } + } +}; + +export const AlertPropertiesSupportingEvidence: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AlertPropertiesSupportingEvidence", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime" - } - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime" - } - }, - highSeverityFailedRulesCount: { - serializedName: "highSeverityFailedRulesCount", + } + } + } +}; + +export const AlertSimulatorRequestBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AlertSimulatorRequestBody", + modelProperties: { + properties: { + serializedName: "properties", type: { - name: "Number" + name: "Composite", + className: "AlertSimulatorRequestProperties" } - }, - mediumSeverityFailedRulesCount: { - serializedName: "mediumSeverityFailedRulesCount", + } + } + } +}; + +export const AlertSimulatorRequestProperties: coreClient.CompositeMapper = { + serializedName: "AlertSimulatorRequestProperties", + type: { + name: "Composite", + className: "AlertSimulatorRequestProperties", + uberParent: "AlertSimulatorRequestProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + modelProperties: { + kind: { + serializedName: "kind", + required: true, type: { - name: "Number" + name: "String" } - }, - lowSeverityFailedRulesCount: { - serializedName: "lowSeverityFailedRulesCount", + } + } + } +}; + +export const SettingsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SettingsList", + modelProperties: { + value: { + serializedName: "value", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Setting" + } + } } }, - totalPassedRulesCount: { - serializedName: "totalPassedRulesCount", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - totalFailedRulesCount: { - serializedName: "totalFailedRulesCount", + } + } + } +}; + +export const IngestionSettingList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IngestionSettingList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IngestionSetting" + } + } } }, - totalRulesCount: { - serializedName: "totalRulesCount", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - isBaselineApplied: { - serializedName: "isBaselineApplied", + } + } + } +}; + +export const IngestionSettingToken: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IngestionSettingToken", + modelProperties: { + token: { + serializedName: "token", + readOnly: true, type: { - name: "Boolean" + name: "String" } } } } }; -export const Scans: coreClient.CompositeMapper = { +export const ConnectionStrings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Scans", + className: "ConnectionStrings", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Scan" + className: "IngestionConnectionString" } } } @@ -3665,100 +3768,78 @@ export const Scans: coreClient.CompositeMapper = { } }; -export const ScanResultProperties: coreClient.CompositeMapper = { +export const IngestionConnectionString: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScanResultProperties", + className: "IngestionConnectionString", modelProperties: { - ruleId: { - serializedName: "ruleId", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } }, - status: { - serializedName: "status", + value: { + serializedName: "value", + readOnly: true, type: { name: "String" } - }, - isTrimmed: { - serializedName: "isTrimmed", - type: { - name: "Boolean" - } - }, - queryResults: { - serializedName: "queryResults", + } + } + } +}; + +export const SoftwaresList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SoftwaresList", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "Software" } } } }, - remediation: { - serializedName: "remediation", - type: { - name: "Composite", - className: "Remediation" - } - }, - baselineAdjustedResult: { - serializedName: "baselineAdjustedResult", - type: { - name: "Composite", - className: "BaselineAdjustedResult" - } - }, - ruleMetadata: { - serializedName: "ruleMetadata", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "VaRule" + name: "String" } } } } }; -export const Remediation: coreClient.CompositeMapper = { +export const SecurityConnectorsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Remediation", + className: "SecurityConnectorsList", modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - scripts: { - serializedName: "scripts", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "SecurityConnector" } } } }, - automated: { - serializedName: "automated", - type: { - name: "Boolean" - } - }, - portalLink: { - serializedName: "portalLink", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -3767,216 +3848,238 @@ export const Remediation: coreClient.CompositeMapper = { } }; -export const BaselineAdjustedResult: coreClient.CompositeMapper = { +export const CloudOffering: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaselineAdjustedResult", + className: "CloudOffering", + uberParent: "CloudOffering", + polymorphicDiscriminator: { + serializedName: "offeringType", + clientName: "offeringType" + }, modelProperties: { - baseline: { - serializedName: "baseline", - type: { - name: "Composite", - className: "Baseline" - } - }, - status: { - serializedName: "status", + offeringType: { + serializedName: "offeringType", + required: true, type: { name: "String" } }, - resultsNotInBaseline: { - serializedName: "resultsNotInBaseline", + description: { + serializedName: "description", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } + name: "String" } - }, - resultsOnlyInBaseline: { - serializedName: "resultsOnlyInBaseline", + } + } + } +}; + +export const EnvironmentData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentData", + uberParent: "EnvironmentData", + polymorphicDiscriminator: { + serializedName: "environmentType", + clientName: "environmentType" + }, + modelProperties: { + environmentType: { + serializedName: "environmentType", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } + name: "String" } } } } }; -export const Baseline: coreClient.CompositeMapper = { +export const GovernanceRuleList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Baseline", + className: "GovernanceRuleList", modelProperties: { - expectedResults: { - serializedName: "expectedResults", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "GovernanceRule" } } } }, - updatedTime: { - serializedName: "updatedTime", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "DateTime" + name: "String" } } } } }; -export const VaRule: coreClient.CompositeMapper = { +export const GovernanceRuleOwnerSource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VaRule", + className: "GovernanceRuleOwnerSource", modelProperties: { - ruleId: { - serializedName: "ruleId", + type: { + serializedName: "type", type: { name: "String" } }, - severity: { - serializedName: "severity", + value: { + serializedName: "value", type: { name: "String" } - }, - category: { - serializedName: "category", + } + } + } +}; + +export const GovernanceRuleEmailNotification: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRuleEmailNotification", + modelProperties: { + disableManagerEmailNotification: { + serializedName: "disableManagerEmailNotification", type: { - name: "String" + name: "Boolean" } }, - ruleType: { - serializedName: "ruleType", + disableOwnerEmailNotification: { + serializedName: "disableOwnerEmailNotification", type: { - name: "String" + name: "Boolean" } - }, - title: { - serializedName: "title", + } + } + } +}; + +export const GovernanceRuleMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceRuleMetadata", + modelProperties: { + createdBy: { + serializedName: "createdBy", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", + createdOn: { + serializedName: "createdOn", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - rationale: { - serializedName: "rationale", + updatedBy: { + serializedName: "updatedBy", + readOnly: true, type: { name: "String" } }, - queryCheck: { - serializedName: "queryCheck", + updatedOn: { + serializedName: "updatedOn", + readOnly: true, type: { - name: "Composite", - className: "QueryCheck" + name: "DateTime" } - }, - benchmarkReferences: { - serializedName: "benchmarkReferences", + } + } + } +}; + +export const ExecuteGovernanceRuleParams: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExecuteGovernanceRuleParams", + modelProperties: { + override: { + serializedName: "override", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BenchmarkReference" - } - } + name: "Boolean" } } } } }; -export const QueryCheck: coreClient.CompositeMapper = { +export const OperationResultAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueryCheck", + className: "OperationResultAutoGenerated", modelProperties: { - query: { - serializedName: "query", + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } - }, - expectedResult: { - serializedName: "expectedResult", + } + } + } +}; + +export const GovernanceAssignmentsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GovernanceAssignmentsList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "GovernanceAssignment" } } } }, - columnNames: { - serializedName: "columnNames", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const BenchmarkReference: coreClient.CompositeMapper = { +export const RemediationEta: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BenchmarkReference", + className: "RemediationEta", modelProperties: { - benchmark: { - serializedName: "benchmark", + eta: { + serializedName: "eta", + required: true, type: { - name: "String" + name: "DateTime" } }, - reference: { - serializedName: "reference", + justification: { + serializedName: "justification", + required: true, type: { name: "String" } @@ -3985,128 +4088,179 @@ export const BenchmarkReference: coreClient.CompositeMapper = { } }; -export const ScanResults: coreClient.CompositeMapper = { +export const GovernanceEmailNotification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScanResults", + className: "GovernanceEmailNotification", modelProperties: { - value: { - serializedName: "value", + disableManagerEmailNotification: { + serializedName: "disableManagerEmailNotification", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScanResult" - } - } + name: "Boolean" + } + }, + disableOwnerEmailNotification: { + serializedName: "disableOwnerEmailNotification", + type: { + name: "Boolean" } } } } }; -export const RuleResultsInput: coreClient.CompositeMapper = { +export const GovernanceAssignmentAdditionalData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RuleResultsInput", + className: "GovernanceAssignmentAdditionalData", modelProperties: { - latestScan: { - serializedName: "latestScan", + ticketNumber: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "ticketNumber", type: { - name: "Boolean" + name: "Number" } }, - results: { - serializedName: "results", + ticketLink: { + serializedName: "ticketLink", type: { - name: "Sequence", - element: { - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } + name: "String" + } + }, + ticketStatus: { + serializedName: "ticketStatus", + type: { + name: "String" } } } } }; -export const RuleResultsProperties: coreClient.CompositeMapper = { +export const ApplicationsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RuleResultsProperties", + className: "ApplicationsList", modelProperties: { - results: { - serializedName: "results", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "Application" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const RulesResults: coreClient.CompositeMapper = { +export const ApiCollectionResponseList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RulesResults", + className: "ApiCollectionResponseList", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RuleResults" + className: "ApiCollectionResponse" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const RulesResultsInput: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RulesResultsInput", + className: "ErrorResponse", modelProperties: { - latestScan: { - serializedName: "latestScan", + error: { + serializedName: "error", type: { - name: "Boolean" + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" } }, - results: { - serializedName: "results", + message: { + serializedName: "message", + readOnly: true, type: { - name: "Dictionary", - value: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { type: { - name: "Sequence", - element: { - type: { - name: "Sequence", - element: { type: { name: "String" } } - } - } + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" } } } @@ -4115,19 +4269,20 @@ export const RulesResultsInput: coreClient.CompositeMapper = { } }; -export const AlertList: coreClient.CompositeMapper = { +export const HealthReportsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AlertList", + className: "HealthReportsList", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Alert" + className: "HealthReport" } } } @@ -4143,19 +4298,27 @@ export const AlertList: coreClient.CompositeMapper = { } }; -export const ResourceIdentifier: coreClient.CompositeMapper = { +export const ResourceDetailsAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceIdentifier", - uberParent: "ResourceIdentifier", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" - }, + className: "ResourceDetailsAutoGenerated", modelProperties: { - type: { - serializedName: "type", - required: true, + source: { + serializedName: "source", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + connectorId: { + serializedName: "connectorId", + readOnly: true, type: { name: "String" } @@ -4164,15 +4327,37 @@ export const ResourceIdentifier: coreClient.CompositeMapper = { } }; -export const AlertEntity: coreClient.CompositeMapper = { +export const EnvironmentDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AlertEntity", - additionalProperties: { type: { name: "Object" } }, + className: "EnvironmentDetails", modelProperties: { - type: { - serializedName: "type", - readOnly: true, + nativeResourceId: { + serializedName: "nativeResourceId", + type: { + name: "String" + } + }, + environmentHierarchyId: { + serializedName: "environmentHierarchyId", + type: { + name: "String" + } + }, + organizationalHierarchyId: { + serializedName: "organizationalHierarchyId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", type: { name: "String" } @@ -4181,149 +4366,304 @@ export const AlertEntity: coreClient.CompositeMapper = { } }; -export const AlertPropertiesSupportingEvidence: coreClient.CompositeMapper = { +export const HealthDataClassification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AlertPropertiesSupportingEvidence", - additionalProperties: { type: { name: "Object" } }, + className: "HealthDataClassification", modelProperties: { - type: { - serializedName: "type", + component: { + serializedName: "component", + type: { + name: "String" + } + }, + scenario: { + serializedName: "scenario", + type: { + name: "String" + } + }, + scope: { + serializedName: "scope", + type: { + name: "String" + } + } + } + } +}; + +export const StatusAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StatusAutoGenerated", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + statusChangeDate: { + serializedName: "statusChangeDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + firstEvaluationDate: { + serializedName: "firstEvaluationDate", readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const Issue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Issue", + modelProperties: { + issueKey: { + serializedName: "issueKey", + required: true, + type: { + name: "String" + } + }, + issueName: { + serializedName: "issueName", + type: { + name: "String" + } + }, + securityValues: { + serializedName: "securityValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + issueDescription: { + serializedName: "issueDescription", + type: { + name: "String" + } + }, + remediationSteps: { + serializedName: "remediationSteps", + type: { + name: "String" + } + }, + remediationScript: { + serializedName: "remediationScript", type: { name: "String" } + }, + issueAdditionalData: { + serializedName: "issueAdditionalData", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } }; -export const AlertSimulatorRequestBody: coreClient.CompositeMapper = { +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AlertSimulatorRequestBody", + className: "ErrorResponseAutoGenerated", modelProperties: { - properties: { - serializedName: "properties", + error: { + serializedName: "error", type: { name: "Composite", - className: "AlertSimulatorRequestProperties" + className: "ErrorDetailAutoGenerated" } } } } }; -export const AlertSimulatorRequestProperties: coreClient.CompositeMapper = { - serializedName: "AlertSimulatorRequestProperties", +export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AlertSimulatorRequestProperties", - uberParent: "AlertSimulatorRequestProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, + className: "ErrorDetailAutoGenerated", modelProperties: { - kind: { - serializedName: "kind", - required: true, + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, type: { name: "String" } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetailAutoGenerated" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } } } } }; -export const SettingsList: coreClient.CompositeMapper = { +export const ScanProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SettingsList", + className: "ScanProperties", modelProperties: { - value: { - serializedName: "value", + triggerType: { + serializedName: "triggerType", + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + }, + server: { + serializedName: "server", + type: { + name: "String" + } + }, + database: { + serializedName: "database", + type: { + name: "String" + } + }, + sqlVersion: { + serializedName: "sqlVersion", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + highSeverityFailedRulesCount: { + serializedName: "highSeverityFailedRulesCount", + type: { + name: "Number" + } + }, + mediumSeverityFailedRulesCount: { + serializedName: "mediumSeverityFailedRulesCount", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Setting" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + lowSeverityFailedRulesCount: { + serializedName: "lowSeverityFailedRulesCount", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const IngestionSettingList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IngestionSettingList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + totalPassedRulesCount: { + serializedName: "totalPassedRulesCount", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IngestionSetting" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + totalFailedRulesCount: { + serializedName: "totalFailedRulesCount", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const IngestionSettingToken: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IngestionSettingToken", - modelProperties: { - token: { - serializedName: "token", - readOnly: true, + }, + totalRulesCount: { + serializedName: "totalRulesCount", type: { - name: "String" + name: "Number" + } + }, + isBaselineApplied: { + serializedName: "isBaselineApplied", + type: { + name: "Boolean" + } + }, + lastScanTime: { + serializedName: "lastScanTime", + type: { + name: "DateTime" } } } } }; -export const ConnectionStrings: coreClient.CompositeMapper = { +export const Scans: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectionStrings", + className: "Scans", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "IngestionConnectionString" + className: "Scan" } } } @@ -4332,78 +4672,100 @@ export const ConnectionStrings: coreClient.CompositeMapper = { } }; -export const IngestionConnectionString: coreClient.CompositeMapper = { +export const ScanResultProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IngestionConnectionString", + className: "ScanResultProperties", modelProperties: { - location: { - serializedName: "location", - readOnly: true, + ruleId: { + serializedName: "ruleId", type: { name: "String" } }, - value: { - serializedName: "value", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } - } - } - } -}; - -export const SoftwaresList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SoftwaresList", - modelProperties: { - value: { - serializedName: "value", + }, + isTrimmed: { + serializedName: "isTrimmed", + type: { + name: "Boolean" + } + }, + queryResults: { + serializedName: "queryResults", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Software" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + remediation: { + serializedName: "remediation", type: { - name: "String" + name: "Composite", + className: "Remediation" + } + }, + baselineAdjustedResult: { + serializedName: "baselineAdjustedResult", + type: { + name: "Composite", + className: "BaselineAdjustedResult" + } + }, + ruleMetadata: { + serializedName: "ruleMetadata", + type: { + name: "Composite", + className: "VaRule" } } } } }; -export const SecurityConnectorsList: coreClient.CompositeMapper = { +export const Remediation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityConnectorsList", + className: "Remediation", modelProperties: { - value: { - serializedName: "value", - required: true, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + scripts: { + serializedName: "scripts", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SecurityConnector" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + automated: { + serializedName: "automated", + type: { + name: "Boolean" + } + }, + portalLink: { + serializedName: "portalLink", type: { name: "String" } @@ -4412,252 +4774,216 @@ export const SecurityConnectorsList: coreClient.CompositeMapper = { } }; -export const CloudOffering: coreClient.CompositeMapper = { +export const BaselineAdjustedResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudOffering", - uberParent: "CloudOffering", - polymorphicDiscriminator: { - serializedName: "offeringType", - clientName: "offeringType" - }, + className: "BaselineAdjustedResult", modelProperties: { - offeringType: { - serializedName: "offeringType", - required: true, + baseline: { + serializedName: "baseline", type: { - name: "String" + name: "Composite", + className: "Baseline" } }, - description: { - serializedName: "description", - readOnly: true, + status: { + serializedName: "status", type: { name: "String" } - } - } - } -}; - -export const EnvironmentData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EnvironmentData", - uberParent: "EnvironmentData", - polymorphicDiscriminator: { - serializedName: "environmentType", - clientName: "environmentType" - }, - modelProperties: { - environmentType: { - serializedName: "environmentType", - required: true, + }, + resultsNotInBaseline: { + serializedName: "resultsNotInBaseline", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + resultsOnlyInBaseline: { + serializedName: "resultsOnlyInBaseline", + type: { + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } } } } }; -export const GovernanceRuleList: coreClient.CompositeMapper = { +export const Baseline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GovernanceRuleList", + className: "Baseline", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + expectedResults: { + serializedName: "expectedResults", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "GovernanceRule" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + updatedTime: { + serializedName: "updatedTime", type: { - name: "String" + name: "DateTime" } } } } }; -export const GovernanceRuleOwnerSource: coreClient.CompositeMapper = { +export const VaRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GovernanceRuleOwnerSource", + className: "VaRule", modelProperties: { - type: { - serializedName: "type", + ruleId: { + serializedName: "ruleId", type: { name: "String" } }, - value: { - serializedName: "value", + severity: { + serializedName: "severity", type: { name: "String" } - } - } - } -}; - -export const GovernanceRuleEmailNotification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GovernanceRuleEmailNotification", - modelProperties: { - disableManagerEmailNotification: { - serializedName: "disableManagerEmailNotification", + }, + category: { + serializedName: "category", type: { - name: "Boolean" + name: "String" } }, - disableOwnerEmailNotification: { - serializedName: "disableOwnerEmailNotification", + ruleType: { + serializedName: "ruleType", type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const ExecuteGovernanceRuleParams: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExecuteGovernanceRuleParams", - modelProperties: { - override: { - serializedName: "override", + }, + title: { + serializedName: "title", type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const ExecuteRuleStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExecuteRuleStatus", - modelProperties: { - operationId: { - serializedName: "operationId", - readOnly: true, + }, + description: { + serializedName: "description", type: { name: "String" } - } - } - } -}; - -export const GovernanceAssignmentsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GovernanceAssignmentsList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + rationale: { + serializedName: "rationale", + type: { + name: "String" + } + }, + queryCheck: { + serializedName: "queryCheck", + type: { + name: "Composite", + className: "QueryCheck" + } + }, + benchmarkReferences: { + serializedName: "benchmarkReferences", type: { name: "Sequence", element: { type: { name: "Composite", - className: "GovernanceAssignment" + className: "BenchmarkReference" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const RemediationEta: coreClient.CompositeMapper = { +export const QueryCheck: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RemediationEta", + className: "QueryCheck", modelProperties: { - eta: { - serializedName: "eta", - required: true, - type: { - name: "DateTime" - } - }, - justification: { - serializedName: "justification", - required: true, + query: { + serializedName: "query", type: { name: "String" } - } - } - } -}; - -export const GovernanceEmailNotification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GovernanceEmailNotification", - modelProperties: { - disableManagerEmailNotification: { - serializedName: "disableManagerEmailNotification", + }, + expectedResult: { + serializedName: "expectedResult", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - disableOwnerEmailNotification: { - serializedName: "disableOwnerEmailNotification", + columnNames: { + serializedName: "columnNames", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const GovernanceAssignmentAdditionalData: coreClient.CompositeMapper = { +export const BenchmarkReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GovernanceAssignmentAdditionalData", + className: "BenchmarkReference", modelProperties: { - ticketNumber: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "ticketNumber", - type: { - name: "Number" - } - }, - ticketLink: { - serializedName: "ticketLink", + benchmark: { + serializedName: "benchmark", type: { name: "String" } }, - ticketStatus: { - serializedName: "ticketStatus", + reference: { + serializedName: "reference", type: { name: "String" } @@ -4666,128 +4992,128 @@ export const GovernanceAssignmentAdditionalData: coreClient.CompositeMapper = { } }; -export const ApplicationsList: coreClient.CompositeMapper = { +export const ScanResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplicationsList", + className: "ScanResults", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Application" + className: "ScanResult" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const ApiCollectionResponseList: coreClient.CompositeMapper = { +export const RuleResultsInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApiCollectionResponseList", + className: "RuleResultsInput", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + latestScan: { + serializedName: "latestScan", + type: { + name: "Boolean" + } + }, + results: { + serializedName: "results", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ApiCollectionResponse" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const RuleResultsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "RuleResultsProperties", modelProperties: { - error: { - serializedName: "error", + results: { + serializedName: "results", type: { - name: "Composite", - className: "ErrorDetail" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } } } } }; -export const ErrorDetail: coreClient.CompositeMapper = { +export const RulesResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetail", + className: "RulesResults", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ErrorDetail" + className: "RuleResults" } } } + } + } + } +}; + +export const RulesResultsInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RulesResultsInput", + modelProperties: { + latestScan: { + serializedName: "latestScan", + type: { + name: "Boolean" + } }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + results: { + serializedName: "results", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { - name: "Composite", - className: "ErrorAdditionalInfo" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + } } } } @@ -7734,57 +8060,6 @@ export const ConnectorSetting: coreClient.CompositeMapper = { } }; -export const Scan: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Scan", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ScanProperties" - } - } - } - } -}; - -export const ScanResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScanResult", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ScanResultProperties" - } - } - } - } -}; - -export const RuleResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleResults", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "RuleResultsProperties" - } - } - } - } -}; - export const Alert: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8127,6 +8402,13 @@ export const GovernanceRule: coreClient.CompositeMapper = { className: "GovernanceRule", modelProperties: { ...Resource.type.modelProperties, + tenantId: { + serializedName: "properties.tenantId", + readOnly: true, + type: { + name: "String" + } + }, displayName: { serializedName: "properties.displayName", type: { @@ -8140,6 +8422,9 @@ export const GovernanceRule: coreClient.CompositeMapper = { } }, remediationTimeframe: { + constraints: { + Pattern: new RegExp("^[0-9]+\\.[0-9]{2}:[0-9]{2}:[0-9]{2}$") + }, serializedName: "properties.remediationTimeframe", type: { name: "String" @@ -8179,6 +8464,17 @@ export const GovernanceRule: coreClient.CompositeMapper = { name: "String" } }, + excludedScopes: { + serializedName: "properties.excludedScopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, conditionSets: { serializedName: "properties.conditionSets", type: { @@ -8191,6 +8487,12 @@ export const GovernanceRule: coreClient.CompositeMapper = { } } }, + includeMemberScopes: { + serializedName: "properties.includeMemberScopes", + type: { + name: "Boolean" + } + }, ownerSource: { serializedName: "properties.ownerSource", type: { @@ -8204,6 +8506,13 @@ export const GovernanceRule: coreClient.CompositeMapper = { name: "Composite", className: "GovernanceRuleEmailNotification" } + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Composite", + className: "GovernanceRuleMetadata" + } } } } @@ -8321,6 +8630,118 @@ export const ApiCollectionResponse: coreClient.CompositeMapper = { } }; +export const HealthReport: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HealthReport", + modelProperties: { + ...Resource.type.modelProperties, + resourceDetails: { + serializedName: "properties.resourceDetails", + type: { + name: "Composite", + className: "ResourceDetailsAutoGenerated" + } + }, + environmentDetails: { + serializedName: "properties.environmentDetails", + type: { + name: "Composite", + className: "EnvironmentDetails" + } + }, + healthDataClassification: { + serializedName: "properties.healthDataClassification", + type: { + name: "Composite", + className: "HealthDataClassification" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "StatusAutoGenerated" + } + }, + affectedDefendersPlans: { + serializedName: "properties.affectedDefendersPlans", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + issues: { + serializedName: "properties.issues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Issue" + } + } + } + } + } + } +}; + +export const Scan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Scan", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ScanProperties" + } + } + } + } +}; + +export const ScanResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScanResult", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ScanResultProperties" + } + } + } + } +}; + +export const RuleResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuleResults", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "RuleResultsProperties" + } + } + } + } +}; + export const SecurityAssessmentMetadata: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10453,25 +10874,10 @@ export const ProcessNotAllowed: coreClient.CompositeMapper = { } }; -export const GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; - -export const GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders: coreClient.CompositeMapper = { +export const GovernanceRulesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders", + className: "GovernanceRulesDeleteHeaders", modelProperties: { location: { serializedName: "location", @@ -10483,10 +10889,10 @@ export const GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders: coreCli } }; -export const SubscriptionGovernanceRulesExecuteStatusGetHeaders: coreClient.CompositeMapper = { +export const GovernanceRulesExecuteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SubscriptionGovernanceRulesExecuteStatusGetHeaders", + className: "GovernanceRulesExecuteHeaders", modelProperties: { location: { serializedName: "location", @@ -10498,10 +10904,10 @@ export const SubscriptionGovernanceRulesExecuteStatusGetHeaders: coreClient.Comp } }; -export const SecurityConnectorGovernanceRulesExecuteStatusGetHeaders: coreClient.CompositeMapper = { +export const GovernanceRulesOperationResultsHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityConnectorGovernanceRulesExecuteStatusGetHeaders", + className: "GovernanceRulesOperationResultsHeaders", modelProperties: { location: { serializedName: "location", diff --git a/sdk/security/arm-security/src/models/parameters.ts b/sdk/security/arm-security/src/models/parameters.ts index 29b7aecd6c98..40dc8fdb571d 100644 --- a/sdk/security/arm-security/src/models/parameters.ts +++ b/sdk/security/arm-security/src/models/parameters.ts @@ -32,8 +32,6 @@ import { JitNetworkAccessPolicy as JitNetworkAccessPolicyMapper, JitNetworkAccessPolicyInitiateRequest as JitNetworkAccessPolicyInitiateRequestMapper, ConnectorSetting as ConnectorSettingMapper, - RuleResultsInput as RuleResultsInputMapper, - RulesResultsInput as RulesResultsInputMapper, AlertSimulatorRequestBody as AlertSimulatorRequestBodyMapper, Setting as SettingMapper, IngestionSetting as IngestionSettingMapper, @@ -41,7 +39,9 @@ import { GovernanceRule as GovernanceRuleMapper, ExecuteGovernanceRuleParams as ExecuteGovernanceRuleParamsMapper, GovernanceAssignment as GovernanceAssignmentMapper, - Application as ApplicationMapper + Application as ApplicationMapper, + RuleResultsInput as RuleResultsInputMapper, + RulesResultsInput as RulesResultsInputMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -917,73 +917,7 @@ export const connectorSetting: OperationParameter = { mapper: ConnectorSettingMapper }; -export const scanId: OperationURLParameter = { - parameterPath: "scanId", - mapper: { - serializedName: "scanId", - required: true, - type: { - name: "String" - } - } -}; - -export const workspaceId: OperationQueryParameter = { - parameterPath: "workspaceId", - mapper: { - serializedName: "workspaceId", - required: true, - type: { - name: "String" - } - } -}; - export const apiVersion12: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2020-07-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const scanResultId: OperationURLParameter = { - parameterPath: "scanResultId", - mapper: { - serializedName: "scanResultId", - required: true, - type: { - name: "String" - } - } -}; - -export const body4: OperationParameter = { - parameterPath: ["options", "body"], - mapper: RuleResultsInputMapper -}; - -export const ruleId: OperationURLParameter = { - parameterPath: "ruleId", - mapper: { - serializedName: "ruleId", - required: true, - type: { - name: "String" - } - } -}; - -export const body5: OperationParameter = { - parameterPath: ["options", "body"], - mapper: RulesResultsInputMapper -}; - -export const apiVersion13: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-01-01", @@ -1011,7 +945,7 @@ export const alertSimulatorRequestBody: OperationParameter = { mapper: AlertSimulatorRequestBodyMapper }; -export const apiVersion14: OperationQueryParameter = { +export const apiVersion13: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-05-01", @@ -1039,7 +973,7 @@ export const setting1: OperationParameter = { mapper: SettingMapper }; -export const apiVersion15: OperationQueryParameter = { +export const apiVersion14: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2021-01-15-preview", @@ -1067,7 +1001,7 @@ export const ingestionSetting: OperationParameter = { mapper: IngestionSettingMapper }; -export const apiVersion16: OperationQueryParameter = { +export const apiVersion15: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2021-05-01-preview", @@ -1090,7 +1024,7 @@ export const softwareName: OperationURLParameter = { } }; -export const apiVersion17: OperationQueryParameter = { +export const apiVersion16: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-08-01-preview", @@ -1118,7 +1052,7 @@ export const securityConnector: OperationParameter = { mapper: SecurityConnectorMapper }; -export const apiVersion18: OperationQueryParameter = { +export const apiVersion17: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-01-01-preview", @@ -1130,6 +1064,28 @@ export const apiVersion18: OperationQueryParameter = { } }; +export const scope1: OperationURLParameter = { + parameterPath: "scope", + mapper: { + serializedName: "scope", + required: true, + type: { + name: "String" + } + } +}; + +export const ruleId: OperationURLParameter = { + parameterPath: "ruleId", + mapper: { + serializedName: "ruleId", + required: true, + type: { + name: "String" + } + } +}; + export const governanceRule: OperationParameter = { parameterPath: "governanceRule", mapper: GovernanceRuleMapper @@ -1151,6 +1107,20 @@ export const operationId: OperationURLParameter = { } }; +export const assessmentName1: OperationURLParameter = { + parameterPath: "assessmentName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "assessmentName", + required: true, + type: { + name: "String" + } + } +}; + export const assignmentKey: OperationURLParameter = { parameterPath: "assignmentKey", mapper: { @@ -1167,7 +1137,7 @@ export const governanceAssignment: OperationParameter = { mapper: GovernanceAssignmentMapper }; -export const apiVersion19: OperationQueryParameter = { +export const apiVersion18: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-07-01-preview", @@ -1226,7 +1196,7 @@ export const serviceName: OperationURLParameter = { } }; -export const apiVersion20: OperationQueryParameter = { +export const apiVersion19: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2022-11-20-preview", @@ -1252,3 +1222,90 @@ export const apiCollectionId: OperationURLParameter = { } } }; + +export const apiVersion20: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-02-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const scope2: OperationURLParameter = { + parameterPath: "scope", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "scope", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const healthReportName: OperationURLParameter = { + parameterPath: "healthReportName", + mapper: { + constraints: { + Pattern: new RegExp( + "[{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$" + ) + }, + serializedName: "healthReportName", + required: true, + type: { + name: "String" + } + } +}; + +export const scanId: OperationURLParameter = { + parameterPath: "scanId", + mapper: { + serializedName: "scanId", + required: true, + type: { + name: "String" + } + } +}; + +export const workspaceId: OperationQueryParameter = { + parameterPath: "workspaceId", + mapper: { + serializedName: "workspaceId", + required: true, + type: { + name: "String" + } + } +}; + +export const scanResultId: OperationURLParameter = { + parameterPath: "scanResultId", + mapper: { + serializedName: "scanResultId", + required: true, + type: { + name: "String" + } + } +}; + +export const body4: OperationParameter = { + parameterPath: ["options", "body"], + mapper: RuleResultsInputMapper +}; + +export const body5: OperationParameter = { + parameterPath: ["options", "body"], + mapper: RulesResultsInputMapper +}; diff --git a/sdk/security/arm-security/src/operations/aPICollection.ts b/sdk/security/arm-security/src/operations/aPICollection.ts index 39ccc106ba86..57857ac33435 100644 --- a/sdk/security/arm-security/src/operations/aPICollection.ts +++ b/sdk/security/arm-security/src/operations/aPICollection.ts @@ -192,7 +192,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -214,7 +214,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -236,7 +236,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion20], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts b/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts index 0954c6e11437..5600ed33f41b 100644 --- a/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts +++ b/sdk/security/arm-security/src/operations/aPICollectionOffboarding.ts @@ -60,7 +60,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts b/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts index 383eeefe310f..4382f2e663d6 100644 --- a/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts +++ b/sdk/security/arm-security/src/operations/aPICollectionOnboarding.ts @@ -65,7 +65,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion20], + queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts index 969049678fd5..e869623827ac 100644 --- a/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts +++ b/sdk/security/arm-security/src/operations/adaptiveNetworkHardenings.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SecurityCenter } from "../securityCenter"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AdaptiveNetworkHardening, AdaptiveNetworkHardeningsListByExtendedResourceNextOptionalParams, @@ -222,14 +226,14 @@ export class AdaptiveNetworkHardeningsImpl adaptiveNetworkHardeningResourceName: string, body: AdaptiveNetworkHardeningEnforceRequest, options?: AdaptiveNetworkHardeningsEnforceOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -262,9 +266,9 @@ export class AdaptiveNetworkHardeningsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceNamespace, resourceType, @@ -273,10 +277,10 @@ export class AdaptiveNetworkHardeningsImpl body, options }, - enforceOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: enforceOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -438,7 +442,6 @@ const listByExtendedResourceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/alerts.ts b/sdk/security/arm-security/src/operations/alerts.ts index 3c611b84603b..9d1230722faf 100644 --- a/sdk/security/arm-security/src/operations/alerts.ts +++ b/sdk/security/arm-security/src/operations/alerts.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SecurityCenter } from "../securityCenter"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Alert, AlertsListNextOptionalParams, @@ -614,14 +618,14 @@ export class AlertsImpl implements Alerts { ascLocation: string, alertSimulatorRequestBody: AlertSimulatorRequestBody, options?: AlertsSimulateOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -654,15 +658,15 @@ export class AlertsImpl implements Alerts { }; }; - const lro = new LroImpl( - sendOperation, - { ascLocation, alertSimulatorRequestBody, options }, - simulateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { ascLocation, alertSimulatorRequestBody, options }, + spec: simulateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "original-uri" + resourceLocationConfig: "original-uri" }); await poller.poll(); return poller; @@ -776,7 +780,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -793,7 +797,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -814,7 +818,7 @@ const listSubscriptionLevelByRegionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -835,7 +839,7 @@ const listResourceGroupLevelByRegionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -857,7 +861,7 @@ const getSubscriptionLevelOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -879,7 +883,7 @@ const getResourceGroupLevelOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -900,7 +904,7 @@ const updateSubscriptionLevelStateToDismissOperationSpec: coreClient.OperationSp bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -920,7 +924,7 @@ const updateSubscriptionLevelStateToResolveOperationSpec: coreClient.OperationSp bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -940,7 +944,7 @@ const updateSubscriptionLevelStateToActivateOperationSpec: coreClient.OperationS bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -960,7 +964,7 @@ const updateSubscriptionLevelStateToInProgressOperationSpec: coreClient.Operatio bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -980,7 +984,7 @@ const updateResourceGroupLevelStateToResolveOperationSpec: coreClient.OperationS bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1001,7 +1005,7 @@ const updateResourceGroupLevelStateToDismissOperationSpec: coreClient.OperationS bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1022,7 +1026,7 @@ const updateResourceGroupLevelStateToActivateOperationSpec: coreClient.Operation bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1043,7 +1047,7 @@ const updateResourceGroupLevelStateToInProgressOperationSpec: coreClient.Operati bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1068,7 +1072,7 @@ const simulateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.alertSimulatorRequestBody, - queryParameters: [Parameters.apiVersion13], + queryParameters: [Parameters.apiVersion12], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1089,7 +1093,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1109,7 +1112,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1130,7 +1132,6 @@ const listSubscriptionLevelByRegionNextOperationSpec: coreClient.OperationSpec = bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1151,7 +1152,6 @@ const listResourceGroupLevelByRegionNextOperationSpec: coreClient.OperationSpec bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts b/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts index b90563386809..9707f392e809 100644 --- a/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts +++ b/sdk/security/arm-security/src/operations/alertsSuppressionRules.ts @@ -259,7 +259,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion9, Parameters.alertType], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/allowedConnections.ts b/sdk/security/arm-security/src/operations/allowedConnections.ts index 74c87b498b2d..b215dfc24d43 100644 --- a/sdk/security/arm-security/src/operations/allowedConnections.ts +++ b/sdk/security/arm-security/src/operations/allowedConnections.ts @@ -317,7 +317,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -337,7 +336,6 @@ const listByHomeRegionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/applicationOperations.ts b/sdk/security/arm-security/src/operations/applicationOperations.ts index c0ae8b3ec051..19a1a9952c56 100644 --- a/sdk/security/arm-security/src/operations/applicationOperations.ts +++ b/sdk/security/arm-security/src/operations/applicationOperations.ts @@ -94,7 +94,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -119,7 +119,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.application, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -134,7 +134,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applications/{applicationId}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/applications.ts b/sdk/security/arm-security/src/operations/applications.ts index 089098026c88..09accc073ad4 100644 --- a/sdk/security/arm-security/src/operations/applications.ts +++ b/sdk/security/arm-security/src/operations/applications.ts @@ -128,7 +128,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -144,7 +144,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/assessments.ts b/sdk/security/arm-security/src/operations/assessments.ts index 1c9aaadd1d22..110da9064271 100644 --- a/sdk/security/arm-security/src/operations/assessments.ts +++ b/sdk/security/arm-security/src/operations/assessments.ts @@ -288,7 +288,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion11], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/assessmentsMetadata.ts b/sdk/security/arm-security/src/operations/assessmentsMetadata.ts index 7ba2627c3d1b..9d98a0c7c3c0 100644 --- a/sdk/security/arm-security/src/operations/assessmentsMetadata.ts +++ b/sdk/security/arm-security/src/operations/assessmentsMetadata.ts @@ -396,7 +396,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion11], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer @@ -412,7 +411,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion11], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts index 477d3951fb1b..3a858981f895 100644 --- a/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts +++ b/sdk/security/arm-security/src/operations/autoProvisioningSettings.ts @@ -224,7 +224,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion7], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/automations.ts b/sdk/security/arm-security/src/operations/automations.ts index 68b96a1066c3..d1ae70f8e892 100644 --- a/sdk/security/arm-security/src/operations/automations.ts +++ b/sdk/security/arm-security/src/operations/automations.ts @@ -455,7 +455,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion9], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -475,7 +474,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion9], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/complianceResults.ts b/sdk/security/arm-security/src/operations/complianceResults.ts index 658300395eed..44cadb1805ba 100644 --- a/sdk/security/arm-security/src/operations/complianceResults.ts +++ b/sdk/security/arm-security/src/operations/complianceResults.ts @@ -200,7 +200,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion2], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/compliances.ts b/sdk/security/arm-security/src/operations/compliances.ts index 3881d6b2afd0..54c541dbb0e3 100644 --- a/sdk/security/arm-security/src/operations/compliances.ts +++ b/sdk/security/arm-security/src/operations/compliances.ts @@ -201,7 +201,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion7], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/connectors.ts b/sdk/security/arm-security/src/operations/connectors.ts index f158339dbadc..5995d526584a 100644 --- a/sdk/security/arm-security/src/operations/connectors.ts +++ b/sdk/security/arm-security/src/operations/connectors.ts @@ -262,7 +262,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion8], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/customAssessmentAutomations.ts b/sdk/security/arm-security/src/operations/customAssessmentAutomations.ts index 5cb27bd84b4d..205651bcc128 100644 --- a/sdk/security/arm-security/src/operations/customAssessmentAutomations.ts +++ b/sdk/security/arm-security/src/operations/customAssessmentAutomations.ts @@ -415,7 +415,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -436,7 +435,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/customEntityStoreAssignments.ts b/sdk/security/arm-security/src/operations/customEntityStoreAssignments.ts index 6053f992baee..9d1635250f18 100644 --- a/sdk/security/arm-security/src/operations/customEntityStoreAssignments.ts +++ b/sdk/security/arm-security/src/operations/customEntityStoreAssignments.ts @@ -418,7 +418,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -439,7 +438,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts b/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts index 1973fed41420..dff72ed8831d 100644 --- a/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts +++ b/sdk/security/arm-security/src/operations/deviceSecurityGroups.ts @@ -282,7 +282,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion5], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.resourceId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts index 0bc7fd9e81b1..5987441df671 100644 --- a/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts +++ b/sdk/security/arm-security/src/operations/discoveredSecuritySolutions.ts @@ -321,7 +321,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -341,7 +340,6 @@ const listByHomeRegionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts index 4c6438c391c9..e0e2b19cf495 100644 --- a/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts +++ b/sdk/security/arm-security/src/operations/externalSecuritySolutions.ts @@ -321,7 +321,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -341,7 +340,6 @@ const listByHomeRegionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/governanceAssignments.ts b/sdk/security/arm-security/src/operations/governanceAssignments.ts index 31f0228ed73e..c119c7fe7130 100644 --- a/sdk/security/arm-security/src/operations/governanceAssignments.ts +++ b/sdk/security/arm-security/src/operations/governanceAssignments.ts @@ -40,11 +40,11 @@ export class GovernanceAssignmentsImpl implements GovernanceAssignments { } /** - * Get security governanceAssignments on all your resources inside a scope - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type + * Get governance assignments on all of your resources inside a scope + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type * @param options The options parameters. */ public list( @@ -113,11 +113,11 @@ export class GovernanceAssignmentsImpl implements GovernanceAssignments { } /** - * Get security governanceAssignments on all your resources inside a scope - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type + * Get governance assignments on all of your resources inside a scope + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type * @param options The options parameters. */ private _list( @@ -133,12 +133,12 @@ export class GovernanceAssignmentsImpl implements GovernanceAssignments { /** * Get a specific governanceAssignment for the requested scope by AssignmentKey - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type - * @param assignmentKey The security governance assignment key - the assessment key of the required - * governance assignment + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type + * @param assignmentKey The governance assignment key - the assessment key of the required governance + * assignment * @param options The options parameters. */ get( @@ -154,14 +154,14 @@ export class GovernanceAssignmentsImpl implements GovernanceAssignments { } /** - * Creates or update a security GovernanceAssignment on the given subscription. - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type - * @param assignmentKey The security governance assignment key - the assessment key of the required - * governance assignment - * @param governanceAssignment GovernanceAssignment over a subscription scope + * Creates or updates a governance assignment on the given subscription. + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type + * @param assignmentKey The governance assignment key - the assessment key of the required governance + * assignment + * @param governanceAssignment Governance assignment over a subscription scope * @param options The options parameters. */ createOrUpdate( @@ -179,12 +179,12 @@ export class GovernanceAssignmentsImpl implements GovernanceAssignments { /** * Delete a GovernanceAssignment over a given scope - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type - * @param assignmentKey The security governance assignment key - the assessment key of the required - * governance assignment + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type + * @param assignmentKey The governance assignment key - the assessment key of the required governance + * assignment * @param options The options parameters. */ delete( @@ -201,10 +201,10 @@ export class GovernanceAssignmentsImpl implements GovernanceAssignments { /** * ListNext - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ @@ -235,11 +235,11 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, - Parameters.scope, - Parameters.assessmentName + Parameters.scope1, + Parameters.assessmentName1 ], headerParameters: [Parameters.accept], serializer @@ -256,11 +256,11 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, - Parameters.scope, - Parameters.assessmentName, + Parameters.scope1, + Parameters.assessmentName1, Parameters.assignmentKey ], headerParameters: [Parameters.accept], @@ -282,11 +282,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.governanceAssignment, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, - Parameters.scope, - Parameters.assessmentName, + Parameters.scope1, + Parameters.assessmentName1, Parameters.assignmentKey ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -298,11 +298,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, - Parameters.scope, - Parameters.assessmentName, + Parameters.scope1, + Parameters.assessmentName1, Parameters.assignmentKey ], serializer @@ -318,12 +318,11 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.nextLink, - Parameters.scope, - Parameters.assessmentName + Parameters.scope1, + Parameters.assessmentName1 ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/governanceRuleOperations.ts b/sdk/security/arm-security/src/operations/governanceRuleOperations.ts deleted file mode 100644 index 7570f62f879b..000000000000 --- a/sdk/security/arm-security/src/operations/governanceRuleOperations.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { GovernanceRuleOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SecurityCenter } from "../securityCenter"; -import { - GovernanceRule, - GovernanceRuleListNextOptionalParams, - GovernanceRuleListOptionalParams, - GovernanceRuleListResponse, - GovernanceRuleListNextResponse -} from "../models"; - -/// -/** Class containing GovernanceRuleOperations operations. */ -export class GovernanceRuleOperationsImpl implements GovernanceRuleOperations { - private readonly client: SecurityCenter; - - /** - * Initialize a new instance of the class GovernanceRuleOperations class. - * @param client Reference to the service client - */ - constructor(client: SecurityCenter) { - this.client = client; - } - - /** - * Get a list of all relevant governanceRules over a subscription level scope - * @param options The options parameters. - */ - public list( - options?: GovernanceRuleListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: GovernanceRuleListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: GovernanceRuleListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: GovernanceRuleListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of all relevant governanceRules over a subscription level scope - * @param options The options parameters. - */ - private _list( - options?: GovernanceRuleListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: GovernanceRuleListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GovernanceRuleList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GovernanceRuleList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/security/arm-security/src/operations/governanceRules.ts b/sdk/security/arm-security/src/operations/governanceRules.ts index ddba6a77af68..56abcf8c680a 100644 --- a/sdk/security/arm-security/src/operations/governanceRules.ts +++ b/sdk/security/arm-security/src/operations/governanceRules.ts @@ -6,26 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { GovernanceRules } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SecurityCenter } from "../securityCenter"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GovernanceRule, + GovernanceRulesListNextOptionalParams, + GovernanceRulesListOptionalParams, + GovernanceRulesListResponse, GovernanceRulesGetOptionalParams, GovernanceRulesGetResponse, - GovernanceRule, GovernanceRulesCreateOrUpdateOptionalParams, GovernanceRulesCreateOrUpdateResponse, GovernanceRulesDeleteOptionalParams, - GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams, - GovernanceRulesRuleIdExecuteSingleSubscriptionResponse, - GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams, - GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + GovernanceRulesExecuteOptionalParams, + GovernanceRulesExecuteResponse, + GovernanceRulesOperationResultsOptionalParams, + GovernanceRulesOperationResultsResponse, + GovernanceRulesListNextResponse } from "../models"; +/// /** Class containing GovernanceRules operations. */ export class GovernanceRulesImpl implements GovernanceRules { private readonly client: SecurityCenter; @@ -39,75 +50,147 @@ export class GovernanceRulesImpl implements GovernanceRules { } /** - * Get a specific governanceRule for the requested scope by ruleId - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Get a list of all relevant governance rules over a scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param options The options parameters. + */ + public list( + scope: string, + options?: GovernanceRulesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(scope, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(scope, options, settings); + } + }; + } + + private async *listPagingPage( + scope: string, + options?: GovernanceRulesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: GovernanceRulesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(scope, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(scope, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + scope: string, + options?: GovernanceRulesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(scope, options)) { + yield* page; + } + } + + /** + * Get a list of all relevant governance rules over a scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param options The options parameters. + */ + private _list( + scope: string, + options?: GovernanceRulesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, options }, + listOperationSpec + ); + } + + /** + * Get a specific governance rule for the requested scope by ruleId + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ get( + scope: string, ruleId: string, options?: GovernanceRulesGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { ruleId, options }, + { scope, ruleId, options }, getOperationSpec ); } /** - * Creates or update a security GovernanceRule on the given subscription. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param governanceRule GovernanceRule over a subscription scope + * Creates or updates a governance rule over a given scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) + * @param governanceRule Governance rule over a given scope * @param options The options parameters. */ createOrUpdate( + scope: string, ruleId: string, governanceRule: GovernanceRule, options?: GovernanceRulesCreateOrUpdateOptionalParams ): Promise { return this.client.sendOperationRequest( - { ruleId, governanceRule, options }, + { scope, ruleId, governanceRule, options }, createOrUpdateOperationSpec ); } /** - * Delete a GovernanceRule over a given scope - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Delete a Governance rule over a given scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - delete( + async beginDelete( + scope: string, ruleId: string, options?: GovernanceRulesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { ruleId, options }, - deleteOperationSpec - ); - } - - /** - * Execute a security GovernanceRule on the given subscription. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param options The options parameters. - */ - async beginRuleIdExecuteSingleSubscription( - ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams - ): Promise< - PollerLike< - PollOperationState< - GovernanceRulesRuleIdExecuteSingleSubscriptionResponse - >, - GovernanceRulesRuleIdExecuteSingleSubscriptionResponse - > - > { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -140,63 +223,64 @@ export class GovernanceRulesImpl implements GovernanceRules { }; }; - const lro = new LroImpl( - sendOperation, - { ruleId, options }, - ruleIdExecuteSingleSubscriptionOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { scope, ruleId, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Execute a security GovernanceRule on the given subscription. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Delete a Governance rule over a given scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - async beginRuleIdExecuteSingleSubscriptionAndWait( + async beginDeleteAndWait( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams - ): Promise { - const poller = await this.beginRuleIdExecuteSingleSubscription( - ruleId, - options - ); + options?: GovernanceRulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(scope, ruleId, options); return poller.pollUntilDone(); } /** - * Execute a security GovernanceRule on the given security connector. - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Execute a governance rule + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - async beginRuleIdExecuteSingleSecurityConnector( - resourceGroupName: string, - securityConnectorName: string, + async beginExecute( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams + options?: GovernanceRulesExecuteOptionalParams ): Promise< - PollerLike< - PollOperationState< - GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse - >, - GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + SimplePollerLike< + OperationState, + GovernanceRulesExecuteResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -229,48 +313,104 @@ export class GovernanceRulesImpl implements GovernanceRules { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, securityConnectorName, ruleId, options }, - ruleIdExecuteSingleSecurityConnectorOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { scope, ruleId, options }, + spec: executeOperationSpec + }); + const poller = await createHttpPoller< + GovernanceRulesExecuteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Execute a security GovernanceRule on the given security connector. - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Execute a governance rule + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - async beginRuleIdExecuteSingleSecurityConnectorAndWait( - resourceGroupName: string, - securityConnectorName: string, + async beginExecuteAndWait( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams - ): Promise { - const poller = await this.beginRuleIdExecuteSingleSecurityConnector( - resourceGroupName, - securityConnectorName, - ruleId, - options - ); + options?: GovernanceRulesExecuteOptionalParams + ): Promise { + const poller = await this.beginExecute(scope, ruleId, options); return poller.pollUntilDone(); } + + /** + * Get governance rules long run operation result for the requested scope by ruleId and operationId + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) + * @param operationId The governance rule long running operation unique key + * @param options The options parameters. + */ + operationResults( + scope: string, + ruleId: string, + operationId: string, + options?: GovernanceRulesOperationResultsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, ruleId, operationId, options }, + operationResultsOperationSpec + ); + } + + /** + * ListNext + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + scope: string, + nextLink: string, + options?: GovernanceRulesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, nextLink, options }, + listNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listOperationSpec: coreClient.OperationSpec = { + path: "/{scope}/providers/Microsoft.Security/governanceRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRuleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion17], + urlParameters: [Parameters.$host, Parameters.scope1], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}", + path: "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", httpMethod: "GET", responses: { 200: { @@ -280,18 +420,13 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.ruleId - ], + queryParameters: [Parameters.apiVersion17], + urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], headerParameters: [Parameters.accept], serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}", + path: "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", httpMethod: "PUT", responses: { 200: { @@ -305,100 +440,85 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.governanceRule, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.ruleId - ], + queryParameters: [Parameters.apiVersion17], + urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}", + path: "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}", httpMethod: "DELETE", - responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.ruleId - ], + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion17], + urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], serializer }; -const ruleIdExecuteSingleSubscriptionOperationSpec: coreClient.OperationSpec = { +const executeOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}/execute", + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}/execute", httpMethod: "POST", responses: { 200: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + headersMapper: Mappers.GovernanceRulesExecuteHeaders }, 201: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + headersMapper: Mappers.GovernanceRulesExecuteHeaders }, 202: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + headersMapper: Mappers.GovernanceRulesExecuteHeaders }, 204: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSubscriptionHeaders + headersMapper: Mappers.GovernanceRulesExecuteHeaders }, default: { bodyMapper: Mappers.CloudError } }, requestBody: Parameters.executeGovernanceRuleParams, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.ruleId - ], + queryParameters: [Parameters.apiVersion17], + urlParameters: [Parameters.$host, Parameters.scope1, Parameters.ruleId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const ruleIdExecuteSingleSecurityConnectorOperationSpec: coreClient.OperationSpec = { +const operationResultsOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}/execute", - httpMethod: "POST", + "/{scope}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}", + httpMethod: "GET", responses: { 200: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders - }, - 201: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + bodyMapper: Mappers.OperationResultAutoGenerated }, 202: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders - }, - 204: { - headersMapper: - Mappers.GovernanceRulesRuleIdExecuteSingleSecurityConnectorHeaders + headersMapper: Mappers.GovernanceRulesOperationResultsHeaders }, default: { bodyMapper: Mappers.CloudError } }, - requestBody: Parameters.executeGovernanceRuleParams, - queryParameters: [Parameters.apiVersion18], + queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, + Parameters.scope1, Parameters.ruleId, - Parameters.securityConnectorName + Parameters.operationId ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GovernanceRuleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope1], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/security/arm-security/src/operations/healthReportOperations.ts b/sdk/security/arm-security/src/operations/healthReportOperations.ts new file mode 100644 index 000000000000..c497a95651fc --- /dev/null +++ b/sdk/security/arm-security/src/operations/healthReportOperations.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { HealthReportOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenter } from "../securityCenter"; +import { + HealthReportGetOptionalParams, + HealthReportGetResponse +} from "../models"; + +/** Class containing HealthReportOperations operations. */ +export class HealthReportOperationsImpl implements HealthReportOperations { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class HealthReportOperations class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get health report of resource + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type + * @param options The options parameters. + */ + get( + resourceId: string, + healthReportName: string, + options?: HealthReportGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceId, healthReportName, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/{resourceId}/providers/Microsoft.Security/healthReports/{healthReportName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HealthReport + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion20], + urlParameters: [ + Parameters.$host, + Parameters.resourceId, + Parameters.healthReportName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/healthReports.ts b/sdk/security/arm-security/src/operations/healthReports.ts new file mode 100644 index 000000000000..d25e2c5d8bfd --- /dev/null +++ b/sdk/security/arm-security/src/operations/healthReports.ts @@ -0,0 +1,164 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { HealthReports } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SecurityCenter } from "../securityCenter"; +import { + HealthReport, + HealthReportsListNextOptionalParams, + HealthReportsListOptionalParams, + HealthReportsListResponse, + HealthReportsListNextResponse +} from "../models"; + +/// +/** Class containing HealthReports operations. */ +export class HealthReportsImpl implements HealthReports { + private readonly client: SecurityCenter; + + /** + * Initialize a new instance of the class HealthReports class. + * @param client Reference to the service client + */ + constructor(client: SecurityCenter) { + this.client = client; + } + + /** + * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param scope The scope at which the operation is performed. + * @param options The options parameters. + */ + public list( + scope: string, + options?: HealthReportsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(scope, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(scope, options, settings); + } + }; + } + + private async *listPagingPage( + scope: string, + options?: HealthReportsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: HealthReportsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(scope, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(scope, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + scope: string, + options?: HealthReportsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(scope, options)) { + yield* page; + } + } + + /** + * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param scope The scope at which the operation is performed. + * @param options The options parameters. + */ + private _list( + scope: string, + options?: HealthReportsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param scope The scope at which the operation is performed. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + scope: string, + nextLink: string, + options?: HealthReportsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { scope, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/{scope}/providers/Microsoft.Security/healthReports", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HealthReportsList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + queryParameters: [Parameters.apiVersion20], + urlParameters: [Parameters.$host, Parameters.scope2], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HealthReportsList + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope2], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/security/arm-security/src/operations/index.ts b/sdk/security/arm-security/src/operations/index.ts index ffcf4dbbb7d0..8a83f3789bea 100644 --- a/sdk/security/arm-security/src/operations/index.ts +++ b/sdk/security/arm-security/src/operations/index.ts @@ -47,20 +47,12 @@ export * from "./secureScoreControls"; export * from "./secureScoreControlDefinitions"; export * from "./securitySolutions"; export * from "./connectors"; -export * from "./sqlVulnerabilityAssessmentScans"; -export * from "./sqlVulnerabilityAssessmentScanResults"; -export * from "./sqlVulnerabilityAssessmentBaselineRules"; export * from "./alerts"; export * from "./settings"; export * from "./ingestionSettings"; export * from "./softwareInventories"; export * from "./securityConnectors"; -export * from "./governanceRuleOperations"; export * from "./governanceRules"; -export * from "./securityConnectorGovernanceRule"; -export * from "./securityConnectorGovernanceRules"; -export * from "./subscriptionGovernanceRulesExecuteStatus"; -export * from "./securityConnectorGovernanceRulesExecuteStatus"; export * from "./governanceAssignments"; export * from "./applications"; export * from "./applicationOperations"; @@ -69,3 +61,8 @@ export * from "./securityConnectorApplication"; export * from "./aPICollection"; export * from "./aPICollectionOnboarding"; export * from "./aPICollectionOffboarding"; +export * from "./healthReports"; +export * from "./healthReportOperations"; +export * from "./sqlVulnerabilityAssessmentScans"; +export * from "./sqlVulnerabilityAssessmentScanResults"; +export * from "./sqlVulnerabilityAssessmentBaselineRules"; diff --git a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts index 308b5aad1276..b84d1057f415 100644 --- a/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts +++ b/sdk/security/arm-security/src/operations/informationProtectionPolicies.ts @@ -258,7 +258,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion7], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/ingestionSettings.ts b/sdk/security/arm-security/src/operations/ingestionSettings.ts index 20e49b6265d6..ec5e8d1b26c4 100644 --- a/sdk/security/arm-security/src/operations/ingestionSettings.ts +++ b/sdk/security/arm-security/src/operations/ingestionSettings.ts @@ -219,7 +219,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion14], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -236,7 +236,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -258,7 +258,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.ingestionSetting, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -279,7 +279,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -300,7 +300,7 @@ const listTokensOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -321,7 +321,7 @@ const listConnectionStringsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], + queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -341,7 +341,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolution.ts b/sdk/security/arm-security/src/operations/iotSecuritySolution.ts index da2006151614..c739e757ffd8 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolution.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolution.ts @@ -460,7 +460,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion5, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -480,7 +479,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion5, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts index 591232afc82d..e146144ab92b 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsAggregatedAlert.ts @@ -274,7 +274,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion5, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts index 17f16039df73..afd26f8fa0f0 100644 --- a/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts +++ b/sdk/security/arm-security/src/operations/iotSecuritySolutionsAnalyticsRecommendation.ts @@ -239,7 +239,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion5, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts index d1787f5f575f..695dade9ea3d 100644 --- a/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts +++ b/sdk/security/arm-security/src/operations/jitNetworkAccessPolicies.ts @@ -755,7 +755,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -775,7 +774,6 @@ const listByRegionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -796,7 +794,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -817,7 +814,6 @@ const listByResourceGroupAndRegionNextOperationSpec: coreClient.OperationSpec = bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/locations.ts b/sdk/security/arm-security/src/operations/locations.ts index 4331121b098f..0fb76877e4af 100644 --- a/sdk/security/arm-security/src/operations/locations.ts +++ b/sdk/security/arm-security/src/operations/locations.ts @@ -187,7 +187,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion6], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/operations.ts b/sdk/security/arm-security/src/operations/operations.ts index 5d26baaa3bc5..ed9a01091a19 100644 --- a/sdk/security/arm-security/src/operations/operations.ts +++ b/sdk/security/arm-security/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion6], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts index 257e1f1ed673..5ec66a21bbd3 100644 --- a/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceAssessments.ts @@ -249,7 +249,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.filter, Parameters.apiVersion9], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts index eac6a49052c7..74695b81a4f2 100644 --- a/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceControls.ts @@ -216,7 +216,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.filter, Parameters.apiVersion9], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts b/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts index 2bd2b46c852f..e8d0465dd088 100644 --- a/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts +++ b/sdk/security/arm-security/src/operations/regulatoryComplianceStandards.ts @@ -183,7 +183,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.filter, Parameters.apiVersion9], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts b/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts index 920a0d6dc310..a717baec1347 100644 --- a/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts +++ b/sdk/security/arm-security/src/operations/secureScoreControlDefinitions.ts @@ -249,7 +249,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer @@ -265,7 +264,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/secureScoreControls.ts b/sdk/security/arm-security/src/operations/secureScoreControls.ts index 554b30125fcb..4416bf891b4a 100644 --- a/sdk/security/arm-security/src/operations/secureScoreControls.ts +++ b/sdk/security/arm-security/src/operations/secureScoreControls.ts @@ -273,7 +273,6 @@ const listBySecureScoreNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -294,7 +293,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10, Parameters.expand1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/secureScores.ts b/sdk/security/arm-security/src/operations/secureScores.ts index cd92d5be5942..3a56bf03f5ae 100644 --- a/sdk/security/arm-security/src/operations/secureScores.ts +++ b/sdk/security/arm-security/src/operations/secureScores.ts @@ -184,7 +184,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityConnectorApplication.ts b/sdk/security/arm-security/src/operations/securityConnectorApplication.ts index d409d1fa7bf5..d6bf6a66dfeb 100644 --- a/sdk/security/arm-security/src/operations/securityConnectorApplication.ts +++ b/sdk/security/arm-security/src/operations/securityConnectorApplication.ts @@ -116,7 +116,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -143,7 +143,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.application, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -160,7 +160,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/applications/{applicationId}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityConnectorApplications.ts b/sdk/security/arm-security/src/operations/securityConnectorApplications.ts index 2b73284961b7..9436d7a1e731 100644 --- a/sdk/security/arm-security/src/operations/securityConnectorApplications.ts +++ b/sdk/security/arm-security/src/operations/securityConnectorApplications.ts @@ -173,7 +173,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19], + queryParameters: [Parameters.apiVersion18], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -194,7 +194,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion19], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts deleted file mode 100644 index 20863977505a..000000000000 --- a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRule.ts +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { SecurityConnectorGovernanceRule } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SecurityCenter } from "../securityCenter"; -import { - GovernanceRule, - SecurityConnectorGovernanceRuleListNextOptionalParams, - SecurityConnectorGovernanceRuleListOptionalParams, - SecurityConnectorGovernanceRuleListResponse, - SecurityConnectorGovernanceRuleListNextResponse -} from "../models"; - -/// -/** Class containing SecurityConnectorGovernanceRule operations. */ -export class SecurityConnectorGovernanceRuleImpl - implements SecurityConnectorGovernanceRule { - private readonly client: SecurityCenter; - - /** - * Initialize a new instance of the class SecurityConnectorGovernanceRule class. - * @param client Reference to the service client - */ - constructor(client: SecurityCenter) { - this.client = client; - } - - /** - * Get a list of all relevant governanceRules over a security connector level scope - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - securityConnectorName: string, - options?: SecurityConnectorGovernanceRuleListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - securityConnectorName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - securityConnectorName, - options, - settings - ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - securityConnectorName: string, - options?: SecurityConnectorGovernanceRuleListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: SecurityConnectorGovernanceRuleListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - securityConnectorName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - securityConnectorName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - securityConnectorName: string, - options?: SecurityConnectorGovernanceRuleListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - securityConnectorName, - options - )) { - yield* page; - } - } - - /** - * Get a list of all relevant governanceRules over a security connector level scope - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - securityConnectorName: string, - options?: SecurityConnectorGovernanceRuleListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, securityConnectorName, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - securityConnectorName: string, - nextLink: string, - options?: SecurityConnectorGovernanceRuleListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, securityConnectorName, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GovernanceRuleList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.securityConnectorName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GovernanceRuleList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink, - Parameters.securityConnectorName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts deleted file mode 100644 index 7496358d926b..000000000000 --- a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRules.ts +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SecurityConnectorGovernanceRules } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SecurityCenter } from "../securityCenter"; -import { - SecurityConnectorGovernanceRulesGetOptionalParams, - SecurityConnectorGovernanceRulesGetResponse, - GovernanceRule, - SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams, - SecurityConnectorGovernanceRulesCreateOrUpdateResponse, - SecurityConnectorGovernanceRulesDeleteOptionalParams -} from "../models"; - -/** Class containing SecurityConnectorGovernanceRules operations. */ -export class SecurityConnectorGovernanceRulesImpl - implements SecurityConnectorGovernanceRules { - private readonly client: SecurityCenter; - - /** - * Initialize a new instance of the class SecurityConnectorGovernanceRules class. - * @param client Reference to the service client - */ - constructor(client: SecurityCenter) { - this.client = client; - } - - /** - * Get a specific governanceRule for the requested scope by ruleId - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param options The options parameters. - */ - get( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - options?: SecurityConnectorGovernanceRulesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, securityConnectorName, ruleId, options }, - getOperationSpec - ); - } - - /** - * Creates or update a security GovernanceRule on the given security connector. - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param governanceRule GovernanceRule over a subscription scope - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - governanceRule: GovernanceRule, - options?: SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - securityConnectorName, - ruleId, - governanceRule, - options - }, - createOrUpdateOperationSpec - ); - } - - /** - * Delete a GovernanceRule over a given scope - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - options?: SecurityConnectorGovernanceRulesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, securityConnectorName, ruleId, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GovernanceRule - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleId, - Parameters.securityConnectorName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GovernanceRule - }, - 201: { - bodyMapper: Mappers.GovernanceRule - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.governanceRule, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleId, - Parameters.securityConnectorName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}", - httpMethod: "DELETE", - responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleId, - Parameters.securityConnectorName - ], - serializer -}; diff --git a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts deleted file mode 100644 index 07be6bd51c7d..000000000000 --- a/sdk/security/arm-security/src/operations/securityConnectorGovernanceRulesExecuteStatus.ts +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SecurityConnectorGovernanceRulesExecuteStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SecurityCenter } from "../securityCenter"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams, - SecurityConnectorGovernanceRulesExecuteStatusGetResponse -} from "../models"; - -/** Class containing SecurityConnectorGovernanceRulesExecuteStatus operations. */ -export class SecurityConnectorGovernanceRulesExecuteStatusImpl - implements SecurityConnectorGovernanceRulesExecuteStatus { - private readonly client: SecurityCenter; - - /** - * Initialize a new instance of the class SecurityConnectorGovernanceRulesExecuteStatus class. - * @param client Reference to the service client - */ - constructor(client: SecurityCenter) { - this.client = client; - } - - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - async beginGet( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - operationId: string, - options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams - ): Promise< - PollerLike< - PollOperationState< - SecurityConnectorGovernanceRulesExecuteStatusGetResponse - >, - SecurityConnectorGovernanceRulesExecuteStatusGetResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { - resourceGroupName, - securityConnectorName, - ruleId, - operationId, - options - }, - getOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - async beginGetAndWait( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - operationId: string, - options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams - ): Promise { - const poller = await this.beginGet( - resourceGroupName, - securityConnectorName, - ruleId, - operationId, - options - ); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - 201: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - 202: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - 204: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleId, - Parameters.securityConnectorName, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/security/arm-security/src/operations/securityConnectors.ts b/sdk/security/arm-security/src/operations/securityConnectors.ts index 6399e0059845..c7da752ba74d 100644 --- a/sdk/security/arm-security/src/operations/securityConnectors.ts +++ b/sdk/security/arm-security/src/operations/securityConnectors.ts @@ -324,7 +324,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion16], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -341,7 +341,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -362,7 +362,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -388,7 +388,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.securityConnector, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -412,7 +412,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.securityConnector, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -434,7 +434,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], + queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -455,7 +455,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -475,7 +474,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion17], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securityContacts.ts b/sdk/security/arm-security/src/operations/securityContacts.ts index d78aa8f67604..f378d1032a07 100644 --- a/sdk/security/arm-security/src/operations/securityContacts.ts +++ b/sdk/security/arm-security/src/operations/securityContacts.ts @@ -263,7 +263,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion8], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/securitySolutions.ts b/sdk/security/arm-security/src/operations/securitySolutions.ts index b1823fa4227f..9fb03eb72019 100644 --- a/sdk/security/arm-security/src/operations/securitySolutions.ts +++ b/sdk/security/arm-security/src/operations/securitySolutions.ts @@ -190,7 +190,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts index 8c2bdb01662c..48a91a5943e0 100644 --- a/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts +++ b/sdk/security/arm-security/src/operations/serverVulnerabilityAssessmentOperations.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SecurityCenter } from "../securityCenter"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ServerVulnerabilityAssessmentListByExtendedResourceOptionalParams, ServerVulnerabilityAssessmentListByExtendedResourceResponse, @@ -136,14 +140,14 @@ export class ServerVulnerabilityAssessmentOperationsImpl resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -176,21 +180,21 @@ export class ServerVulnerabilityAssessmentOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceNamespace, resourceType, resourceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/security/arm-security/src/operations/settings.ts b/sdk/security/arm-security/src/operations/settings.ts index a252cca2152e..656fedf1aea4 100644 --- a/sdk/security/arm-security/src/operations/settings.ts +++ b/sdk/security/arm-security/src/operations/settings.ts @@ -164,7 +164,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion13], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -181,7 +181,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -203,7 +203,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.setting1, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion13], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -224,7 +224,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion14], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/softwareInventories.ts b/sdk/security/arm-security/src/operations/softwareInventories.ts index 1cbe05bb487e..c27168e8f7f0 100644 --- a/sdk/security/arm-security/src/operations/softwareInventories.ts +++ b/sdk/security/arm-security/src/operations/softwareInventories.ts @@ -330,7 +330,7 @@ const listByExtendedResourceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -354,7 +354,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion15], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -371,7 +371,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], + queryParameters: [Parameters.apiVersion15], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -395,7 +395,6 @@ const listByExtendedResourceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -419,7 +418,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion16], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts index 6a3f9b2a0de0..a480acfc6849 100644 --- a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentBaselineRules.ts @@ -143,7 +143,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.body4, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.ruleId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -161,7 +161,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.ruleId], headerParameters: [Parameters.accept], serializer @@ -177,7 +177,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.ruleId], headerParameters: [Parameters.accept], serializer @@ -194,7 +194,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId], headerParameters: [Parameters.accept], serializer @@ -212,7 +212,7 @@ const addOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.body5, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts index 23200284ae59..c9884d6c69ac 100644 --- a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScanResults.ts @@ -86,7 +86,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [ Parameters.$host, Parameters.resourceId, @@ -108,7 +108,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.scanId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts index 5c823464ece3..e52a4cc61fdb 100644 --- a/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts +++ b/sdk/security/arm-security/src/operations/sqlVulnerabilityAssessmentScans.ts @@ -82,7 +82,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.scanId], headerParameters: [Parameters.accept], serializer @@ -99,7 +99,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.workspaceId, Parameters.apiVersion12], + queryParameters: [Parameters.apiVersion20, Parameters.workspaceId], urlParameters: [Parameters.$host, Parameters.resourceId], headerParameters: [Parameters.accept], serializer diff --git a/sdk/security/arm-security/src/operations/subAssessments.ts b/sdk/security/arm-security/src/operations/subAssessments.ts index b7de6f7eeb88..f9906bd9a39a 100644 --- a/sdk/security/arm-security/src/operations/subAssessments.ts +++ b/sdk/security/arm-security/src/operations/subAssessments.ts @@ -343,7 +343,6 @@ const listAllNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion9], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope], headerParameters: [Parameters.accept], serializer @@ -359,7 +358,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion9], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts deleted file mode 100644 index 5a7947e2a89d..000000000000 --- a/sdk/security/arm-security/src/operations/subscriptionGovernanceRulesExecuteStatus.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SubscriptionGovernanceRulesExecuteStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SecurityCenter } from "../securityCenter"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - SubscriptionGovernanceRulesExecuteStatusGetOptionalParams, - SubscriptionGovernanceRulesExecuteStatusGetResponse -} from "../models"; - -/** Class containing SubscriptionGovernanceRulesExecuteStatus operations. */ -export class SubscriptionGovernanceRulesExecuteStatusImpl - implements SubscriptionGovernanceRulesExecuteStatus { - private readonly client: SecurityCenter; - - /** - * Initialize a new instance of the class SubscriptionGovernanceRulesExecuteStatus class. - * @param client Reference to the service client - */ - constructor(client: SecurityCenter) { - this.client = client; - } - - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - async beginGet( - ruleId: string, - operationId: string, - options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SubscriptionGovernanceRulesExecuteStatusGetResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { ruleId, operationId, options }, - getOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - async beginGetAndWait( - ruleId: string, - operationId: string, - options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams - ): Promise { - const poller = await this.beginGet(ruleId, operationId, options); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - 201: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - 202: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - 204: { - bodyMapper: Mappers.ExecuteRuleStatus - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion18], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.ruleId, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/security/arm-security/src/operations/tasks.ts b/sdk/security/arm-security/src/operations/tasks.ts index c47865dc9c0c..c3f87db872c0 100644 --- a/sdk/security/arm-security/src/operations/tasks.ts +++ b/sdk/security/arm-security/src/operations/tasks.ts @@ -601,7 +601,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.filter, Parameters.apiVersion6], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -621,7 +620,6 @@ const listByHomeRegionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.filter, Parameters.apiVersion6], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -642,7 +640,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.filter, Parameters.apiVersion6], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/topology.ts b/sdk/security/arm-security/src/operations/topology.ts index 9cac9af0fec4..59500e309e6d 100644 --- a/sdk/security/arm-security/src/operations/topology.ts +++ b/sdk/security/arm-security/src/operations/topology.ts @@ -315,7 +315,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -335,7 +334,6 @@ const listByHomeRegionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion10], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operations/workspaceSettings.ts b/sdk/security/arm-security/src/operations/workspaceSettings.ts index 1bf77edbda23..7e712dae40f2 100644 --- a/sdk/security/arm-security/src/operations/workspaceSettings.ts +++ b/sdk/security/arm-security/src/operations/workspaceSettings.ts @@ -305,7 +305,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion7], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/security/arm-security/src/operationsInterfaces/adaptiveNetworkHardenings.ts b/sdk/security/arm-security/src/operationsInterfaces/adaptiveNetworkHardenings.ts index bc19b255542e..d04913861d6a 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/adaptiveNetworkHardenings.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/adaptiveNetworkHardenings.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AdaptiveNetworkHardening, AdaptiveNetworkHardeningsListByExtendedResourceOptionalParams, @@ -73,7 +73,7 @@ export interface AdaptiveNetworkHardenings { adaptiveNetworkHardeningResourceName: string, body: AdaptiveNetworkHardeningEnforceRequest, options?: AdaptiveNetworkHardeningsEnforceOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Enforces the given rules on the NSG(s) listed in the request * @param resourceGroupName The name of the resource group within the user's subscription. The name is diff --git a/sdk/security/arm-security/src/operationsInterfaces/alerts.ts b/sdk/security/arm-security/src/operationsInterfaces/alerts.ts index 47aa171ef6fb..f572a237f1cd 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/alerts.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/alerts.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Alert, AlertsListOptionalParams, @@ -218,7 +218,7 @@ export interface Alerts { ascLocation: string, alertSimulatorRequestBody: AlertSimulatorRequestBody, options?: AlertsSimulateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Simulate security alerts * @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from diff --git a/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts b/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts index 367898165d13..974e7ffcf270 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/governanceAssignments.ts @@ -21,11 +21,11 @@ import { /** Interface representing a GovernanceAssignments. */ export interface GovernanceAssignments { /** - * Get security governanceAssignments on all your resources inside a scope - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type + * Get governance assignments on all of your resources inside a scope + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type * @param options The options parameters. */ list( @@ -35,12 +35,12 @@ export interface GovernanceAssignments { ): PagedAsyncIterableIterator; /** * Get a specific governanceAssignment for the requested scope by AssignmentKey - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type - * @param assignmentKey The security governance assignment key - the assessment key of the required - * governance assignment + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type + * @param assignmentKey The governance assignment key - the assessment key of the required governance + * assignment * @param options The options parameters. */ get( @@ -50,14 +50,14 @@ export interface GovernanceAssignments { options?: GovernanceAssignmentsGetOptionalParams ): Promise; /** - * Creates or update a security GovernanceAssignment on the given subscription. - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type - * @param assignmentKey The security governance assignment key - the assessment key of the required - * governance assignment - * @param governanceAssignment GovernanceAssignment over a subscription scope + * Creates or updates a governance assignment on the given subscription. + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type + * @param assignmentKey The governance assignment key - the assessment key of the required governance + * assignment + * @param governanceAssignment Governance assignment over a subscription scope * @param options The options parameters. */ createOrUpdate( @@ -69,12 +69,12 @@ export interface GovernanceAssignments { ): Promise; /** * Delete a GovernanceAssignment over a given scope - * @param scope Scope of the query, can be subscription - * (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group - * (/providers/Microsoft.Management/managementGroups/mgName). - * @param assessmentName The Assessment Key - Unique key for the assessment type - * @param assignmentKey The security governance assignment key - the assessment key of the required - * governance assignment + * @param scope The scope of the Governance assignments. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param assessmentName The Assessment Key - A unique key for the assessment type + * @param assignmentKey The governance assignment key - the assessment key of the required governance + * assignment * @param options The options parameters. */ delete( diff --git a/sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts b/sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts deleted file mode 100644 index db471f8f1802..000000000000 --- a/sdk/security/arm-security/src/operationsInterfaces/governanceRuleOperations.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { GovernanceRule, GovernanceRuleListOptionalParams } from "../models"; - -/// -/** Interface representing a GovernanceRuleOperations. */ -export interface GovernanceRuleOperations { - /** - * Get a list of all relevant governanceRules over a subscription level scope - * @param options The options parameters. - */ - list( - options?: GovernanceRuleListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts b/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts index c34e6f9ee9ff..577e2c6f4b45 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/governanceRules.ts @@ -6,109 +6,142 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { + GovernanceRule, + GovernanceRulesListOptionalParams, GovernanceRulesGetOptionalParams, GovernanceRulesGetResponse, - GovernanceRule, GovernanceRulesCreateOrUpdateOptionalParams, GovernanceRulesCreateOrUpdateResponse, GovernanceRulesDeleteOptionalParams, - GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams, - GovernanceRulesRuleIdExecuteSingleSubscriptionResponse, - GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams, - GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse + GovernanceRulesExecuteOptionalParams, + GovernanceRulesExecuteResponse, + GovernanceRulesOperationResultsOptionalParams, + GovernanceRulesOperationResultsResponse } from "../models"; +/// /** Interface representing a GovernanceRules. */ export interface GovernanceRules { /** - * Get a specific governanceRule for the requested scope by ruleId - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Get a list of all relevant governance rules over a scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param options The options parameters. + */ + list( + scope: string, + options?: GovernanceRulesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a specific governance rule for the requested scope by ruleId + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ get( + scope: string, ruleId: string, options?: GovernanceRulesGetOptionalParams ): Promise; /** - * Creates or update a security GovernanceRule on the given subscription. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param governanceRule GovernanceRule over a subscription scope + * Creates or updates a governance rule over a given scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) + * @param governanceRule Governance rule over a given scope * @param options The options parameters. */ createOrUpdate( + scope: string, ruleId: string, governanceRule: GovernanceRule, options?: GovernanceRulesCreateOrUpdateOptionalParams ): Promise; /** - * Delete a GovernanceRule over a given scope - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Delete a Governance rule over a given scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - delete( + beginDelete( + scope: string, ruleId: string, options?: GovernanceRulesDeleteOptionalParams - ): Promise; + ): Promise, void>>; /** - * Execute a security GovernanceRule on the given subscription. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Delete a Governance rule over a given scope + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - beginRuleIdExecuteSingleSubscription( + beginDeleteAndWait( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams - ): Promise< - PollerLike< - PollOperationState< - GovernanceRulesRuleIdExecuteSingleSubscriptionResponse - >, - GovernanceRulesRuleIdExecuteSingleSubscriptionResponse - > - >; + options?: GovernanceRulesDeleteOptionalParams + ): Promise; /** - * Execute a security GovernanceRule on the given subscription. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Execute a governance rule + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - beginRuleIdExecuteSingleSubscriptionAndWait( + beginExecute( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSubscriptionOptionalParams - ): Promise; + options?: GovernanceRulesExecuteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GovernanceRulesExecuteResponse + > + >; /** - * Execute a security GovernanceRule on the given security connector. - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Execute a governance rule + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) * @param options The options parameters. */ - beginRuleIdExecuteSingleSecurityConnector( - resourceGroupName: string, - securityConnectorName: string, + beginExecuteAndWait( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams - ): Promise< - PollerLike< - PollOperationState< - GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse - >, - GovernanceRulesRuleIdExecuteSingleSecurityConnectorResponse - > - >; + options?: GovernanceRulesExecuteOptionalParams + ): Promise; /** - * Execute a security GovernanceRule on the given security connector. - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule + * Get governance rules long run operation result for the requested scope by ruleId and operationId + * @param scope The scope of the Governance rules. Valid scopes are: management group (format: + * 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param ruleId The governance rule key - unique key for the standard governance rule (GUID) + * @param operationId The governance rule long running operation unique key * @param options The options parameters. */ - beginRuleIdExecuteSingleSecurityConnectorAndWait( - resourceGroupName: string, - securityConnectorName: string, + operationResults( + scope: string, ruleId: string, - options?: GovernanceRulesRuleIdExecuteSingleSecurityConnectorOptionalParams - ): Promise; + operationId: string, + options?: GovernanceRulesOperationResultsOptionalParams + ): Promise; } diff --git a/sdk/security/arm-security/src/operationsInterfaces/healthReportOperations.ts b/sdk/security/arm-security/src/operationsInterfaces/healthReportOperations.ts new file mode 100644 index 000000000000..240b79319a78 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/healthReportOperations.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + HealthReportGetOptionalParams, + HealthReportGetResponse +} from "../models"; + +/** Interface representing a HealthReportOperations. */ +export interface HealthReportOperations { + /** + * Get health report of resource + * @param resourceId The identifier of the resource. + * @param healthReportName The health report Key - Unique key for the health report type + * @param options The options parameters. + */ + get( + resourceId: string, + healthReportName: string, + options?: HealthReportGetOptionalParams + ): Promise; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts b/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts new file mode 100644 index 000000000000..2126939b24b8 --- /dev/null +++ b/sdk/security/arm-security/src/operationsInterfaces/healthReports.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { HealthReport, HealthReportsListOptionalParams } from "../models"; + +/// +/** Interface representing a HealthReports. */ +export interface HealthReports { + /** + * Get a list of all health reports inside a scope. Valid scopes are: subscription (format: + * 'subscriptions/{subscriptionId}'), or security connector (format: + * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})' + * @param scope The scope at which the operation is performed. + * @param options The options parameters. + */ + list( + scope: string, + options?: HealthReportsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/security/arm-security/src/operationsInterfaces/index.ts b/sdk/security/arm-security/src/operationsInterfaces/index.ts index ffcf4dbbb7d0..8a83f3789bea 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/index.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/index.ts @@ -47,20 +47,12 @@ export * from "./secureScoreControls"; export * from "./secureScoreControlDefinitions"; export * from "./securitySolutions"; export * from "./connectors"; -export * from "./sqlVulnerabilityAssessmentScans"; -export * from "./sqlVulnerabilityAssessmentScanResults"; -export * from "./sqlVulnerabilityAssessmentBaselineRules"; export * from "./alerts"; export * from "./settings"; export * from "./ingestionSettings"; export * from "./softwareInventories"; export * from "./securityConnectors"; -export * from "./governanceRuleOperations"; export * from "./governanceRules"; -export * from "./securityConnectorGovernanceRule"; -export * from "./securityConnectorGovernanceRules"; -export * from "./subscriptionGovernanceRulesExecuteStatus"; -export * from "./securityConnectorGovernanceRulesExecuteStatus"; export * from "./governanceAssignments"; export * from "./applications"; export * from "./applicationOperations"; @@ -69,3 +61,8 @@ export * from "./securityConnectorApplication"; export * from "./aPICollection"; export * from "./aPICollectionOnboarding"; export * from "./aPICollectionOffboarding"; +export * from "./healthReports"; +export * from "./healthReportOperations"; +export * from "./sqlVulnerabilityAssessmentScans"; +export * from "./sqlVulnerabilityAssessmentScanResults"; +export * from "./sqlVulnerabilityAssessmentBaselineRules"; diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts deleted file mode 100644 index 3915eb144a6f..000000000000 --- a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRule.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GovernanceRule, - SecurityConnectorGovernanceRuleListOptionalParams -} from "../models"; - -/// -/** Interface representing a SecurityConnectorGovernanceRule. */ -export interface SecurityConnectorGovernanceRule { - /** - * Get a list of all relevant governanceRules over a security connector level scope - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - securityConnectorName: string, - options?: SecurityConnectorGovernanceRuleListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts deleted file mode 100644 index 3a13eefc1357..000000000000 --- a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRules.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - SecurityConnectorGovernanceRulesGetOptionalParams, - SecurityConnectorGovernanceRulesGetResponse, - GovernanceRule, - SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams, - SecurityConnectorGovernanceRulesCreateOrUpdateResponse, - SecurityConnectorGovernanceRulesDeleteOptionalParams -} from "../models"; - -/** Interface representing a SecurityConnectorGovernanceRules. */ -export interface SecurityConnectorGovernanceRules { - /** - * Get a specific governanceRule for the requested scope by ruleId - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param options The options parameters. - */ - get( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - options?: SecurityConnectorGovernanceRulesGetOptionalParams - ): Promise; - /** - * Creates or update a security GovernanceRule on the given security connector. - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param governanceRule GovernanceRule over a subscription scope - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - governanceRule: GovernanceRule, - options?: SecurityConnectorGovernanceRulesCreateOrUpdateOptionalParams - ): Promise; - /** - * Delete a GovernanceRule over a given scope - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - options?: SecurityConnectorGovernanceRulesDeleteOptionalParams - ): Promise; -} diff --git a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts deleted file mode 100644 index 8620f1d2b067..000000000000 --- a/sdk/security/arm-security/src/operationsInterfaces/securityConnectorGovernanceRulesExecuteStatus.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams, - SecurityConnectorGovernanceRulesExecuteStatusGetResponse -} from "../models"; - -/** Interface representing a SecurityConnectorGovernanceRulesExecuteStatus. */ -export interface SecurityConnectorGovernanceRulesExecuteStatus { - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - beginGet( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - operationId: string, - options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams - ): Promise< - PollerLike< - PollOperationState< - SecurityConnectorGovernanceRulesExecuteStatusGetResponse - >, - SecurityConnectorGovernanceRulesExecuteStatusGetResponse - > - >; - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param resourceGroupName The name of the resource group within the user's subscription. The name is - * case insensitive. - * @param securityConnectorName The security connector name. - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - beginGetAndWait( - resourceGroupName: string, - securityConnectorName: string, - ruleId: string, - operationId: string, - options?: SecurityConnectorGovernanceRulesExecuteStatusGetOptionalParams - ): Promise; -} diff --git a/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentOperations.ts b/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentOperations.ts index dcc5b53697b2..ea53cc3b80f1 100644 --- a/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentOperations.ts +++ b/sdk/security/arm-security/src/operationsInterfaces/serverVulnerabilityAssessmentOperations.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ServerVulnerabilityAssessmentListByExtendedResourceOptionalParams, ServerVulnerabilityAssessmentListByExtendedResourceResponse, @@ -83,7 +83,7 @@ export interface ServerVulnerabilityAssessmentOperations { resourceType: string, resourceName: string, options?: ServerVulnerabilityAssessmentDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Removing server vulnerability assessment from a resource. * @param resourceGroupName The name of the resource group within the user's subscription. The name is diff --git a/sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts b/sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts deleted file mode 100644 index 9dda1f5c5373..000000000000 --- a/sdk/security/arm-security/src/operationsInterfaces/subscriptionGovernanceRulesExecuteStatus.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - SubscriptionGovernanceRulesExecuteStatusGetOptionalParams, - SubscriptionGovernanceRulesExecuteStatusGetResponse -} from "../models"; - -/** Interface representing a SubscriptionGovernanceRulesExecuteStatus. */ -export interface SubscriptionGovernanceRulesExecuteStatus { - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - beginGet( - ruleId: string, - operationId: string, - options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SubscriptionGovernanceRulesExecuteStatusGetResponse - > - >; - /** - * Get a specific governanceRule execution status for the requested scope by ruleId and operationId - * @param ruleId The security GovernanceRule key - unique key for the standard GovernanceRule - * @param operationId The security GovernanceRule execution key - unique key for the execution of - * GovernanceRule - * @param options The options parameters. - */ - beginGetAndWait( - ruleId: string, - operationId: string, - options?: SubscriptionGovernanceRulesExecuteStatusGetOptionalParams - ): Promise; -} diff --git a/sdk/security/arm-security/src/pagingHelper.ts b/sdk/security/arm-security/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/security/arm-security/src/pagingHelper.ts +++ b/sdk/security/arm-security/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/security/arm-security/src/securityCenter.ts b/sdk/security/arm-security/src/securityCenter.ts index e73ae63bcda7..48fddb95d2ec 100644 --- a/sdk/security/arm-security/src/securityCenter.ts +++ b/sdk/security/arm-security/src/securityCenter.ts @@ -51,20 +51,12 @@ import { SecureScoreControlDefinitionsImpl, SecuritySolutionsImpl, ConnectorsImpl, - SqlVulnerabilityAssessmentScansImpl, - SqlVulnerabilityAssessmentScanResultsImpl, - SqlVulnerabilityAssessmentBaselineRulesImpl, AlertsImpl, SettingsImpl, IngestionSettingsImpl, SoftwareInventoriesImpl, SecurityConnectorsImpl, - GovernanceRuleOperationsImpl, GovernanceRulesImpl, - SecurityConnectorGovernanceRuleImpl, - SecurityConnectorGovernanceRulesImpl, - SubscriptionGovernanceRulesExecuteStatusImpl, - SecurityConnectorGovernanceRulesExecuteStatusImpl, GovernanceAssignmentsImpl, ApplicationsImpl, ApplicationOperationsImpl, @@ -72,7 +64,12 @@ import { SecurityConnectorApplicationImpl, APICollectionImpl, APICollectionOnboardingImpl, - APICollectionOffboardingImpl + APICollectionOffboardingImpl, + HealthReportsImpl, + HealthReportOperationsImpl, + SqlVulnerabilityAssessmentScansImpl, + SqlVulnerabilityAssessmentScanResultsImpl, + SqlVulnerabilityAssessmentBaselineRulesImpl } from "./operations"; import { MdeOnboardings, @@ -116,20 +113,12 @@ import { SecureScoreControlDefinitions, SecuritySolutions, Connectors, - SqlVulnerabilityAssessmentScans, - SqlVulnerabilityAssessmentScanResults, - SqlVulnerabilityAssessmentBaselineRules, Alerts, Settings, IngestionSettings, SoftwareInventories, SecurityConnectors, - GovernanceRuleOperations, GovernanceRules, - SecurityConnectorGovernanceRule, - SecurityConnectorGovernanceRules, - SubscriptionGovernanceRulesExecuteStatus, - SecurityConnectorGovernanceRulesExecuteStatus, GovernanceAssignments, Applications, ApplicationOperations, @@ -137,7 +126,12 @@ import { SecurityConnectorApplication, APICollection, APICollectionOnboarding, - APICollectionOffboarding + APICollectionOffboarding, + HealthReports, + HealthReportOperations, + SqlVulnerabilityAssessmentScans, + SqlVulnerabilityAssessmentScanResults, + SqlVulnerabilityAssessmentBaselineRules } from "./operationsInterfaces"; import { SecurityCenterOptionalParams } from "./models"; @@ -294,34 +288,12 @@ export class SecurityCenter extends coreClient.ServiceClient { ); this.securitySolutions = new SecuritySolutionsImpl(this); this.connectors = new ConnectorsImpl(this); - this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansImpl( - this - ); - this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsImpl( - this - ); - this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesImpl( - this - ); this.alerts = new AlertsImpl(this); this.settings = new SettingsImpl(this); this.ingestionSettings = new IngestionSettingsImpl(this); this.softwareInventories = new SoftwareInventoriesImpl(this); this.securityConnectors = new SecurityConnectorsImpl(this); - this.governanceRuleOperations = new GovernanceRuleOperationsImpl(this); this.governanceRules = new GovernanceRulesImpl(this); - this.securityConnectorGovernanceRule = new SecurityConnectorGovernanceRuleImpl( - this - ); - this.securityConnectorGovernanceRules = new SecurityConnectorGovernanceRulesImpl( - this - ); - this.subscriptionGovernanceRulesExecuteStatus = new SubscriptionGovernanceRulesExecuteStatusImpl( - this - ); - this.securityConnectorGovernanceRulesExecuteStatus = new SecurityConnectorGovernanceRulesExecuteStatusImpl( - this - ); this.governanceAssignments = new GovernanceAssignmentsImpl(this); this.applications = new ApplicationsImpl(this); this.applicationOperations = new ApplicationOperationsImpl(this); @@ -334,6 +306,17 @@ export class SecurityCenter extends coreClient.ServiceClient { this.aPICollection = new APICollectionImpl(this); this.aPICollectionOnboarding = new APICollectionOnboardingImpl(this); this.aPICollectionOffboarding = new APICollectionOffboardingImpl(this); + this.healthReports = new HealthReportsImpl(this); + this.healthReportOperations = new HealthReportOperationsImpl(this); + this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansImpl( + this + ); + this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsImpl( + this + ); + this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesImpl( + this + ); } mdeOnboardings: MdeOnboardings; @@ -377,20 +360,12 @@ export class SecurityCenter extends coreClient.ServiceClient { secureScoreControlDefinitions: SecureScoreControlDefinitions; securitySolutions: SecuritySolutions; connectors: Connectors; - sqlVulnerabilityAssessmentScans: SqlVulnerabilityAssessmentScans; - sqlVulnerabilityAssessmentScanResults: SqlVulnerabilityAssessmentScanResults; - sqlVulnerabilityAssessmentBaselineRules: SqlVulnerabilityAssessmentBaselineRules; alerts: Alerts; settings: Settings; ingestionSettings: IngestionSettings; softwareInventories: SoftwareInventories; securityConnectors: SecurityConnectors; - governanceRuleOperations: GovernanceRuleOperations; governanceRules: GovernanceRules; - securityConnectorGovernanceRule: SecurityConnectorGovernanceRule; - securityConnectorGovernanceRules: SecurityConnectorGovernanceRules; - subscriptionGovernanceRulesExecuteStatus: SubscriptionGovernanceRulesExecuteStatus; - securityConnectorGovernanceRulesExecuteStatus: SecurityConnectorGovernanceRulesExecuteStatus; governanceAssignments: GovernanceAssignments; applications: Applications; applicationOperations: ApplicationOperations; @@ -399,4 +374,9 @@ export class SecurityCenter extends coreClient.ServiceClient { aPICollection: APICollection; aPICollectionOnboarding: APICollectionOnboarding; aPICollectionOffboarding: APICollectionOffboarding; + healthReports: HealthReports; + healthReportOperations: HealthReportOperations; + sqlVulnerabilityAssessmentScans: SqlVulnerabilityAssessmentScans; + sqlVulnerabilityAssessmentScanResults: SqlVulnerabilityAssessmentScanResults; + sqlVulnerabilityAssessmentBaselineRules: SqlVulnerabilityAssessmentBaselineRules; } diff --git a/sdk/security/arm-security/test/sampleTest.ts b/sdk/security/arm-security/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/security/arm-security/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/security/arm-security/tsconfig.json b/sdk/security/arm-security/tsconfig.json index 3f5144384125..3e6ae96443f3 100644 --- a/sdk/security/arm-security/tsconfig.json +++ b/sdk/security/arm-security/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-security": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"