From 8e9daa2799d890428f801d37108c42ea9557f136 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 24 Sep 2022 11:39:19 +0000 Subject: [PATCH] CodeGen from PR 20858 in Azure/azure-rest-api-specs Merge 95bc5bb7657702c4cd7344a6d3749beca4d35e25 into 34ba022add0034e30462b76e1548ce5a7e053e33 --- common/config/rush/pnpm-lock.yaml | 38 +- .../arm-securityinsight/CHANGELOG.md | 73 ++- .../arm-securityinsight/README.md | 2 +- .../arm-securityinsight/_meta.json | 8 +- .../arm-securityinsight/package.json | 16 +- .../review/arm-securityinsight.api.md | 258 ++++++++- .../arm-securityinsight/src/lroImpl.ts | 34 ++ .../arm-securityinsight/src/models/index.ts | 491 +++++++++++++++++- .../arm-securityinsight/src/models/mappers.ts | 480 ++++++++++++++++- .../src/models/parameters.ts | 19 +- .../src/operations/fileImports.ts | 410 +++++++++++++++ .../src/operations/index.ts | 1 + .../src/operationsInterfaces/fileImports.ts | 95 ++++ .../src/operationsInterfaces/index.ts | 1 + .../src/securityInsights.ts | 43 +- .../arm-securityinsight/tsconfig.json | 10 +- 16 files changed, 1878 insertions(+), 101 deletions(-) create mode 100644 sdk/securityinsight/arm-securityinsight/src/lroImpl.ts create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/fileImports.ts create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/fileImports.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 303ef39a9bcb..dbaa11747483 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3083,7 +3083,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3338,7 +3338,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3488,7 +3488,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3626,7 +3626,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3689,7 +3689,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3791,7 +3791,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.0: @@ -4045,7 +4045,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220923 + typescript: 4.9.0-dev.20220924 dev: false /downlevel-dts/0.8.0: @@ -4064,11 +4064,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.199: @@ -4950,7 +4950,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -5090,7 +5090,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6498,7 +6498,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6508,7 +6508,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -6929,7 +6929,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -8989,8 +8989,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220923: - resolution: {integrity: sha512-BaTN9dPBZugYsJFXtoEFz85E7WsalhCrJT3IcrGj+d3LVrwVCOqiFxY/uNfhWkvJ4apXqjQrgiXiYxtPL/TKSw==} + /typescript/4.9.0-dev.20220924: + resolution: {integrity: sha512-s7VYYZby5bpb5kApyp0uDvC+/W/dJ73J3q6KM6MYekV3T2pnXBHH2ncaGSJPIBV14u16jfYN4qqYNqQdd1BhgA==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -9101,7 +9101,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -14501,12 +14501,12 @@ packages: dev: false file:projects/arm-securityinsight.tgz: - resolution: {integrity: sha512-JDOzHkmbkYBEPX3sWO83Z6k39RBTdeASQcFJP/oeH4qzOk0oX1OBsq47R1dK9lHS2lY+YCIPOwskb9YyfUlnXQ==, tarball: file:projects/arm-securityinsight.tgz} + resolution: {integrity: sha512-k5IOnjuEbX2fUcKeVcPt7m2Bwf8I9iIaT6q73h8A5m9Zn0fWt/b5SdeSDKuopPKR9eVqZPyT8eL/teyP+PdK8A==, tarball: file:projects/arm-securityinsight.tgz} name: '@rush-temp/arm-securityinsight' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.31.1 + '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.0 '@rollup/plugin-json': 4.1.0_rollup@2.79.0 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.0 diff --git a/sdk/securityinsight/arm-securityinsight/CHANGELOG.md b/sdk/securityinsight/arm-securityinsight/CHANGELOG.md index 457f3dc6179b..ddaebf2fd735 100644 --- a/sdk/securityinsight/arm-securityinsight/CHANGELOG.md +++ b/sdk/securityinsight/arm-securityinsight/CHANGELOG.md @@ -1,15 +1,72 @@ # Release History + +## 1.0.0-beta.5 (2022-09-24) + +**Features** -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group FileImports + - Added Interface AlertPropertyMapping + - Added Interface AutomationRuleBooleanCondition + - Added Interface AutomationRulePropertyArrayValuesCondition + - Added Interface BooleanConditionProperties + - Added Interface FileImport + - Added Interface FileImportList + - Added Interface FileImportsCreateOptionalParams + - Added Interface FileImportsDeleteOptionalParams + - Added Interface FileImportsGetOptionalParams + - Added Interface FileImportsListNextOptionalParams + - Added Interface FileImportsListOptionalParams + - Added Interface FileMetadata + - Added Interface PropertyArrayConditionProperties + - Added Interface SentinelEntityMapping + - Added Interface ValidationError + - Added Type Alias AlertProperty + - Added Type Alias AutomationRuleBooleanConditionSupportedOperator + - Added Type Alias AutomationRulePropertyArrayConditionSupportedArrayConditionType + - Added Type Alias AutomationRulePropertyArrayConditionSupportedArrayType + - Added Type Alias DeleteStatus + - Added Type Alias FileFormat + - Added Type Alias FileImportContentType + - Added Type Alias FileImportsCreateResponse + - Added Type Alias FileImportsDeleteResponse + - Added Type Alias FileImportsGetResponse + - Added Type Alias FileImportsListNextResponse + - Added Type Alias FileImportsListResponse + - Added Type Alias FileImportState + - Added Type Alias IngestionMode + - Interface AlertDetailsOverride has a new optional parameter alertDynamicProperties + - Interface NrtAlertRule has a new optional parameter eventGroupingSettings + - Interface NrtAlertRule has a new optional parameter sentinelEntitiesMappings + - Interface NrtAlertRuleTemplate has a new optional parameter eventGroupingSettings + - Interface NrtAlertRuleTemplate has a new optional parameter sentinelEntitiesMappings + - Interface QueryBasedAlertRuleTemplateProperties has a new optional parameter eventGroupingSettings + - Interface QueryBasedAlertRuleTemplateProperties has a new optional parameter sentinelEntitiesMappings + - Interface ScheduledAlertRule has a new optional parameter sentinelEntitiesMappings + - Interface ScheduledAlertRuleCommonProperties has a new optional parameter sentinelEntitiesMappings + - Interface ScheduledAlertRuleTemplate has a new optional parameter sentinelEntitiesMappings + - Interface SecurityAlertTimelineItem has a new optional parameter intent + - Interface SecurityAlertTimelineItem has a new optional parameter techniques + - Class SecurityInsights has a new parameter fileImports + - Added Enum KnownAlertProperty + - Added Enum KnownAutomationRuleBooleanConditionSupportedOperator + - Added Enum KnownAutomationRulePropertyArrayConditionSupportedArrayConditionType + - Added Enum KnownAutomationRulePropertyArrayConditionSupportedArrayType + - Added Enum KnownDeleteStatus + - Added Enum KnownFileFormat + - Added Enum KnownFileImportContentType + - Added Enum KnownFileImportState + - Added Enum KnownIngestionMode + - Enum KnownAutomationRulePropertyConditionSupportedProperty has a new value IncidentCustomDetailsKey + - Enum KnownAutomationRulePropertyConditionSupportedProperty has a new value IncidentCustomDetailsValue + - Enum KnownAutomationRulePropertyConditionSupportedProperty has a new value IncidentUpdatedBySource + - Enum KnownConditionType has a new value Boolean + - Enum KnownConditionType has a new value PropertyArray -### Other Changes +**Breaking Changes** + - Parameter logicAppsResourceId of interface ManualTriggerRequestBody is now required + + ## 1.0.0-beta.4 (2022-07-11) **Features** diff --git a/sdk/securityinsight/arm-securityinsight/README.md b/sdk/securityinsight/arm-securityinsight/README.md index d4b3978f58fa..7181392099b1 100644 --- a/sdk/securityinsight/arm-securityinsight/README.md +++ b/sdk/securityinsight/arm-securityinsight/README.md @@ -13,7 +13,7 @@ API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provi ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/securityinsight/arm-securityinsight/_meta.json b/sdk/securityinsight/arm-securityinsight/_meta.json index 3a1a3722b6bc..ea58be8dc1c1 100644 --- a/sdk/securityinsight/arm-securityinsight/_meta.json +++ b/sdk/securityinsight/arm-securityinsight/_meta.json @@ -1,8 +1,8 @@ { - "commit": "64496bd64b0376dc4b45e3193a39f7bcdd4b28da", + "commit": "929848ca257915777bbf15e7625758848b3eda78", "readme": "specification/securityinsights/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --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\\securityinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220707.1 --generate-sample=true", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/securityinsights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220707.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/securityinsight/arm-securityinsight/package.json b/sdk/securityinsight/arm-securityinsight/package.json index da23019825bf..9c03843cdd84 100644 --- a/sdk/securityinsight/arm-securityinsight/package.json +++ b/sdk/securityinsight/arm-securityinsight/package.json @@ -8,6 +8,8 @@ "node": ">=12.0.0" }, "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.5.0", "@azure/core-auth": "^1.3.0", @@ -26,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-securityinsight.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", @@ -107,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-securityinsight?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md b/sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md index 0fc0b87afde0..59f329da1d36 100644 --- a/sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md +++ b/sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md @@ -7,6 +7,8 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; // @public export interface AADCheckRequirements extends DataConnectorsCheckRequirements { @@ -238,10 +240,20 @@ export type AlertDetail = string; export interface AlertDetailsOverride { alertDescriptionFormat?: string; alertDisplayNameFormat?: string; + alertDynamicProperties?: AlertPropertyMapping[]; alertSeverityColumnName?: string; alertTacticsColumnName?: string; } +// @public +export type AlertProperty = string; + +// @public +export interface AlertPropertyMapping { + alertProperty?: AlertProperty; + value?: string; +} + // @public export interface AlertRule extends ResourceWithEtag { kind: AlertRuleKind; @@ -458,13 +470,24 @@ export interface AutomationRuleAction { // @public (undocumented) export type AutomationRuleActionUnion = AutomationRuleAction | AutomationRuleModifyPropertiesAction | AutomationRuleRunPlaybookAction; +// @public (undocumented) +export interface AutomationRuleBooleanCondition { + // (undocumented) + innerConditions?: AutomationRuleConditionUnion[]; + // (undocumented) + operator?: AutomationRuleBooleanConditionSupportedOperator; +} + +// @public +export type AutomationRuleBooleanConditionSupportedOperator = string; + // @public export interface AutomationRuleCondition { - conditionType: "PropertyArrayChanged" | "PropertyChanged" | "Property"; + conditionType: "Boolean" | "PropertyArrayChanged" | "PropertyArray" | "PropertyChanged" | "Property"; } // @public (undocumented) -export type AutomationRuleConditionUnion = AutomationRuleCondition | PropertyArrayChangedConditionProperties | PropertyChangedConditionProperties | PropertyConditionProperties; +export type AutomationRuleConditionUnion = AutomationRuleCondition | BooleanConditionProperties | PropertyArrayChangedConditionProperties | PropertyArrayConditionProperties | PropertyChangedConditionProperties | PropertyConditionProperties; // @public export interface AutomationRuleModifyPropertiesAction extends AutomationRuleAction { @@ -487,6 +510,22 @@ export interface AutomationRulePropertyArrayChangedValuesCondition { changeType?: AutomationRulePropertyArrayChangedConditionSupportedChangeType; } +// @public +export type AutomationRulePropertyArrayConditionSupportedArrayConditionType = string; + +// @public +export type AutomationRulePropertyArrayConditionSupportedArrayType = string; + +// @public (undocumented) +export interface AutomationRulePropertyArrayValuesCondition { + // (undocumented) + arrayConditionType?: AutomationRulePropertyArrayConditionSupportedArrayConditionType; + // (undocumented) + arrayType?: AutomationRulePropertyArrayConditionSupportedArrayType; + // (undocumented) + itemConditions?: AutomationRuleConditionUnion[]; +} + // @public export type AutomationRulePropertyChangedConditionSupportedChangedType = string; @@ -824,6 +863,13 @@ export interface BookmarkTimelineItem extends EntityTimelineItem { startTimeUtc?: Date; } +// @public +export interface BooleanConditionProperties extends AutomationRuleCondition { + // (undocumented) + conditionProperties?: AutomationRuleBooleanCondition; + conditionType: "Boolean"; +} + // @public export interface ClientInfo { email?: string; @@ -1175,6 +1221,9 @@ export interface DataTypeDefinitions { // @public export type DataTypeState = string; +// @public +export type DeleteStatus = string; + // @public export type DeliveryAction = "Unknown" | "DeliveredAsSpam" | "Delivered" | "Blocked" | "Replaced"; @@ -1773,6 +1822,9 @@ export interface FileEntityProperties extends EntityCommonProperties { readonly hostEntityId?: string; } +// @public +export type FileFormat = string; + // @public export type FileHashAlgorithm = string; @@ -1792,6 +1844,98 @@ export interface FileHashEntityProperties extends EntityCommonProperties { readonly hashValue?: string; } +// @public +export interface FileImport extends Resource { + contentType?: FileImportContentType; + readonly createdTimeUTC?: Date; + readonly errorFile?: FileMetadata; + readonly errorsPreview?: ValidationError[]; + readonly filesValidUntilTimeUTC?: Date; + importFile?: FileMetadata; + readonly importValidUntilTimeUTC?: Date; + readonly ingestedRecordCount?: number; + ingestionMode?: IngestionMode; + source?: string; + readonly state?: FileImportState; + readonly totalRecordCount?: number; + readonly validRecordCount?: number; +} + +// @public +export type FileImportContentType = string; + +// @public +export interface FileImportList { + readonly nextLink?: string; + value: FileImport[]; +} + +// @public +export interface FileImports { + beginDelete(resourceGroupName: string, workspaceName: string, fileImportId: string, options?: FileImportsDeleteOptionalParams): Promise, FileImportsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, workspaceName: string, fileImportId: string, options?: FileImportsDeleteOptionalParams): Promise; + create(resourceGroupName: string, workspaceName: string, fileImportId: string, fileImport: FileImport, options?: FileImportsCreateOptionalParams): Promise; + get(resourceGroupName: string, workspaceName: string, fileImportId: string, options?: FileImportsGetOptionalParams): Promise; + list(resourceGroupName: string, workspaceName: string, options?: FileImportsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface FileImportsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FileImportsCreateResponse = FileImport; + +// @public +export interface FileImportsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type FileImportsDeleteResponse = FileImport; + +// @public +export interface FileImportsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FileImportsGetResponse = FileImport; + +// @public +export interface FileImportsListNextOptionalParams extends coreClient.OperationOptions { + filter?: string; + orderby?: string; + skipToken?: string; + top?: number; +} + +// @public +export type FileImportsListNextResponse = FileImportList; + +// @public +export interface FileImportsListOptionalParams extends coreClient.OperationOptions { + filter?: string; + orderby?: string; + skipToken?: string; + top?: number; +} + +// @public +export type FileImportsListResponse = FileImportList; + +// @public +export type FileImportState = string; + +// @public +export interface FileMetadata { + readonly deleteStatus?: DeleteStatus; + readonly fileContentUri?: string; + fileFormat?: FileFormat; + fileName?: string; + fileSize?: number; +} + // @public export interface FusionAlertRule extends AlertRule { alertRuleTemplateName?: string; @@ -2310,6 +2454,9 @@ export type IncidentsRunPlaybookResponse = Record; // @public export type IncidentStatus = string; +// @public +export type IngestionMode = string; + // @public export interface InsightQueryItem extends EntityQueryItem { kind: "Insight"; @@ -2528,6 +2675,19 @@ export enum KnownAlertDetail { Severity = "Severity" } +// @public +export enum KnownAlertProperty { + AlertLink = "AlertLink", + ConfidenceLevel = "ConfidenceLevel", + ConfidenceScore = "ConfidenceScore", + ExtendedLinks = "ExtendedLinks", + ProductComponentName = "ProductComponentName", + ProductName = "ProductName", + ProviderName = "ProviderName", + RemediationSteps = "RemediationSteps", + Techniques = "Techniques" +} + // @public export enum KnownAlertRuleKind { Fusion = "Fusion", @@ -2584,6 +2744,12 @@ export enum KnownAttackTactic { ResourceDevelopment = "ResourceDevelopment" } +// @public +export enum KnownAutomationRuleBooleanConditionSupportedOperator { + And = "And", + Or = "Or" +} + // @public export enum KnownAutomationRulePropertyArrayChangedConditionSupportedArrayType { Alerts = "Alerts", @@ -2597,6 +2763,17 @@ export enum KnownAutomationRulePropertyArrayChangedConditionSupportedChangeType Added = "Added" } +// @public +export enum KnownAutomationRulePropertyArrayConditionSupportedArrayConditionType { + AnyItem = "AnyItem" +} + +// @public +export enum KnownAutomationRulePropertyArrayConditionSupportedArrayType { + CustomDetails = "CustomDetails", + CustomDetailValues = "CustomDetailValues" +} + // @public export enum KnownAutomationRulePropertyChangedConditionSupportedChangedType { ChangedFrom = "ChangedFrom", @@ -2647,6 +2824,8 @@ export enum KnownAutomationRulePropertyConditionSupportedProperty { HostNetBiosName = "HostNetBiosName", HostNTDomain = "HostNTDomain", HostOSVersion = "HostOSVersion", + IncidentCustomDetailsKey = "IncidentCustomDetailsKey", + IncidentCustomDetailsValue = "IncidentCustomDetailsValue", IncidentDescription = "IncidentDescription", IncidentLabel = "IncidentLabel", IncidentProviderName = "IncidentProviderName", @@ -2655,6 +2834,7 @@ export enum KnownAutomationRulePropertyConditionSupportedProperty { IncidentStatus = "IncidentStatus", IncidentTactics = "IncidentTactics", IncidentTitle = "IncidentTitle", + IncidentUpdatedBySource = "IncidentUpdatedBySource", IoTDeviceId = "IoTDeviceId", IoTDeviceModel = "IoTDeviceModel", IoTDeviceName = "IoTDeviceName", @@ -2683,7 +2863,9 @@ export enum KnownAutomationRulePropertyConditionSupportedProperty { // @public export enum KnownConditionType { + Boolean = "Boolean", Property = "Property", + PropertyArray = "PropertyArray", PropertyArrayChanged = "PropertyArrayChanged", PropertyChanged = "PropertyChanged" } @@ -2777,6 +2959,13 @@ export enum KnownDataTypeState { Enabled = "Enabled" } +// @public +export enum KnownDeleteStatus { + Deleted = "Deleted", + NotDeleted = "NotDeleted", + Unspecified = "Unspecified" +} + // @public export enum KnownDeploymentFetchStatus { NotFound = "NotFound", @@ -2924,6 +3113,13 @@ export enum KnownEventGroupingAggregationKind { SingleAlert = "SingleAlert" } +// @public +export enum KnownFileFormat { + CSV = "CSV", + Json = "JSON", + Unspecified = "Unspecified" +} + // @public export enum KnownFileHashAlgorithm { MD5 = "MD5", @@ -2933,6 +3129,24 @@ export enum KnownFileHashAlgorithm { Unknown = "Unknown" } +// @public +export enum KnownFileImportContentType { + BasicIndicator = "BasicIndicator", + StixIndicator = "StixIndicator", + Unspecified = "Unspecified" +} + +// @public +export enum KnownFileImportState { + FatalError = "FatalError", + Ingested = "Ingested", + IngestedWithErrors = "IngestedWithErrors", + InProgress = "InProgress", + Invalid = "Invalid", + Unspecified = "Unspecified", + WaitingForUpload = "WaitingForUpload" +} + // @public export enum KnownGetInsightsError { Insight = "Insight" @@ -2975,6 +3189,13 @@ export enum KnownIncidentStatus { New = "New" } +// @public +export enum KnownIngestionMode { + IngestAnyValidRecords = "IngestAnyValidRecords", + IngestOnlyIfAllAreValid = "IngestOnlyIfAllAreValid", + Unspecified = "Unspecified" +} + // @public export enum KnownKillChainIntent { Collection = "Collection", @@ -3354,7 +3575,7 @@ export interface MalwareEntityProperties extends EntityCommonProperties { // @public (undocumented) export interface ManualTriggerRequestBody { // (undocumented) - logicAppsResourceId?: string; + logicAppsResourceId: string; // (undocumented) tenantId?: string; } @@ -3737,9 +3958,11 @@ export interface NrtAlertRule extends AlertRule { displayName?: string; enabled?: boolean; entityMappings?: EntityMapping[]; + eventGroupingSettings?: EventGroupingSettings; incidentConfiguration?: IncidentConfiguration; readonly lastModifiedUtc?: Date; query?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; suppressionDuration?: string; suppressionEnabled?: boolean; @@ -3759,9 +3982,11 @@ export interface NrtAlertRuleTemplate extends AlertRuleTemplate { description?: string; displayName?: string; entityMappings?: EntityMapping[]; + eventGroupingSettings?: EventGroupingSettings; readonly lastUpdatedDateUTC?: Date; query?: string; requiredDataConnectors?: AlertRuleTemplateDataSource[]; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; status?: TemplateStatus; tactics?: AttackTactic[]; @@ -4097,6 +4322,13 @@ export interface PropertyArrayChangedConditionProperties extends AutomationRuleC conditionType: "PropertyArrayChanged"; } +// @public +export interface PropertyArrayConditionProperties extends AutomationRuleCondition { + // (undocumented) + conditionProperties?: AutomationRulePropertyArrayValuesCondition; + conditionType: "PropertyArray"; +} + // @public export interface PropertyChangedConditionProperties extends AutomationRuleCondition { // (undocumented) @@ -4121,7 +4353,9 @@ export interface QueryBasedAlertRuleTemplateProperties { [propertyName: string]: string; }; entityMappings?: EntityMapping[]; + eventGroupingSettings?: EventGroupingSettings; query?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; version?: string; } @@ -4267,6 +4501,7 @@ export interface ScheduledAlertRule extends AlertRule { query?: string; queryFrequency?: string; queryPeriod?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; suppressionDuration?: string; suppressionEnabled?: boolean; @@ -4288,6 +4523,7 @@ export interface ScheduledAlertRuleCommonProperties { query?: string; queryFrequency?: string; queryPeriod?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; triggerOperator?: TriggerOperator; triggerThreshold?: number; @@ -4325,6 +4561,7 @@ export interface ScheduledAlertRuleTemplate extends AlertRuleTemplate { queryFrequency?: string; queryPeriod?: string; requiredDataConnectors?: AlertRuleTemplateDataSource[]; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; status?: TemplateStatus; tactics?: AttackTactic[]; @@ -4409,10 +4646,12 @@ export interface SecurityAlertTimelineItem extends EntityTimelineItem { description?: string; displayName: string; endTimeUtc: Date; + readonly intent?: KillChainIntent; kind: "SecurityAlert"; productName?: string; severity: AlertSeverity; startTimeUtc: Date; + techniques?: string[]; timeGenerated: Date; } @@ -4474,6 +4713,8 @@ export class SecurityInsights extends coreClient.ServiceClient { // (undocumented) entityRelations: EntityRelations; // (undocumented) + fileImports: FileImports; + // (undocumented) incidentComments: IncidentComments; // (undocumented) incidentRelations: IncidentRelations; @@ -4581,6 +4822,11 @@ export type SecurityMLAnalyticsSettingsListResponse = SecurityMLAnalyticsSetting // @public (undocumented) export type SecurityMLAnalyticsSettingUnion = SecurityMLAnalyticsSetting | AnomalySecurityMLAnalyticsSettings; +// @public +export interface SentinelEntityMapping { + columnName?: string; +} + // @public export interface SentinelOnboardingState extends ResourceWithEtag { customerManagedKey?: boolean; @@ -5253,6 +5499,12 @@ export interface UserInfo { objectId?: string; } +// @public +export interface ValidationError { + readonly errorMessages?: string[]; + recordIndex?: number; +} + // @public export type Version = string; diff --git a/sdk/securityinsight/arm-securityinsight/src/lroImpl.ts b/sdk/securityinsight/arm-securityinsight/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/securityinsight/arm-securityinsight/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * 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 { 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" + }); + } +} diff --git a/sdk/securityinsight/arm-securityinsight/src/models/index.ts b/sdk/securityinsight/arm-securityinsight/src/models/index.ts index 955be7527e0d..493a7acccc90 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/index.ts @@ -10,7 +10,9 @@ import * as coreClient from "@azure/core-client"; export type AutomationRuleConditionUnion = | AutomationRuleCondition + | BooleanConditionProperties | PropertyArrayChangedConditionProperties + | PropertyArrayConditionProperties | PropertyChangedConditionProperties | PropertyConditionProperties; export type AutomationRuleActionUnion = @@ -242,7 +244,12 @@ export interface AutomationRuleTriggeringLogic { /** Describes an automation rule condition. */ export interface AutomationRuleCondition { /** Polymorphic discriminator, which specifies the different types this object can be */ - conditionType: "PropertyArrayChanged" | "PropertyChanged" | "Property"; + conditionType: + | "Boolean" + | "PropertyArrayChanged" + | "PropertyArray" + | "PropertyChanged" + | "Property"; } /** Describes an automation rule action. */ @@ -271,7 +278,7 @@ export interface AutomationRulesList { export interface ManualTriggerRequestBody { tenantId?: string; - logicAppsResourceId?: string; + logicAppsResourceId: string; } /** List all the bookmarks. */ @@ -725,6 +732,48 @@ export interface EntityQueryTemplateList { value: EntityQueryTemplateUnion[]; } +/** List all the file imports. */ +export interface FileImportList { + /** + * URL to fetch the next set of file imports. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** Array of file imports. */ + value: FileImport[]; +} + +/** Represents a file. */ +export interface FileMetadata { + /** The format of the file */ + fileFormat?: FileFormat; + /** The name of the file. */ + fileName?: string; + /** The size of the file. */ + fileSize?: number; + /** + * A URI with a valid SAS token to allow uploading / downloading the file. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileContentUri?: string; + /** + * Indicates whether the file was deleted from the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deleteStatus?: DeleteStatus; +} + +/** Describes an error encountered in the file during validation. */ +export interface ValidationError { + /** The number of the record that has the error. */ + recordIndex?: number; + /** + * A list of descriptions of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorMessages?: string[]; +} + /** List all the incidents. */ export interface IncidentList { /** @@ -1428,6 +1477,10 @@ export interface QueryBasedAlertRuleTemplateProperties { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** The event grouping settings. */ + eventGroupingSettings?: EventGroupingSettings; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } /** Single entity mapping for the alert rule */ @@ -1456,6 +1509,28 @@ export interface AlertDetailsOverride { alertTacticsColumnName?: string; /** the column name to take the alert severity from */ alertSeverityColumnName?: string; + /** List of additional dynamic properties to override */ + alertDynamicProperties?: AlertPropertyMapping[]; +} + +/** A single alert property mapping to override */ +export interface AlertPropertyMapping { + /** The V3 alert property */ + alertProperty?: AlertProperty; + /** the column name to use to override this property */ + value?: string; +} + +/** Event grouping settings property bag. */ +export interface EventGroupingSettings { + /** The event grouping aggregation kinds */ + aggregationKind?: EventGroupingAggregationKind; +} + +/** A single sentinel entity mapping */ +export interface SentinelEntityMapping { + /** the column name to be mapped to the SentinelEntities */ + columnName?: string; } /** Represents a supported source signal configuration in Fusion detection. */ @@ -1599,12 +1674,13 @@ export interface ScheduledAlertRuleCommonProperties { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } -/** Event grouping settings property bag. */ -export interface EventGroupingSettings { - /** The event grouping aggregation kinds */ - aggregationKind?: EventGroupingAggregationKind; +export interface AutomationRuleBooleanCondition { + operator?: AutomationRuleBooleanConditionSupportedOperator; + innerConditions?: AutomationRuleConditionUnion[]; } export interface IncidentPropertiesAction { @@ -1629,6 +1705,12 @@ export interface AutomationRulePropertyArrayChangedValuesCondition { changeType?: AutomationRulePropertyArrayChangedConditionSupportedChangeType; } +export interface AutomationRulePropertyArrayValuesCondition { + arrayType?: AutomationRulePropertyArrayConditionSupportedArrayType; + arrayConditionType?: AutomationRulePropertyArrayConditionSupportedArrayConditionType; + itemConditions?: AutomationRuleConditionUnion[]; +} + export interface AutomationRulePropertyValuesChangedCondition { propertyName?: AutomationRulePropertyChangedConditionSupportedPropertyType; changeType?: AutomationRulePropertyChangedConditionSupportedChangedType; @@ -2175,6 +2257,63 @@ export interface EntityQueryTemplate extends Resource { kind: EntityQueryTemplateKind; } +/** Represents a file import in Azure Security Insights. */ +export interface FileImport extends Resource { + /** Describes how to ingest the records in the file. */ + ingestionMode?: IngestionMode; + /** The content type of this file. */ + contentType?: FileImportContentType; + /** + * The time the file was imported. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdTimeUTC?: Date; + /** + * Represents the error file (if the import was ingested with errors or failed the validation). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorFile?: FileMetadata; + /** + * An ordered list of some of the errors that were encountered during validation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorsPreview?: ValidationError[]; + /** Represents the imported file. */ + importFile?: FileMetadata; + /** + * The number of records that have been successfully ingested. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ingestedRecordCount?: number; + /** The source for the data in the file. */ + source?: string; + /** + * The state of the file import. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: FileImportState; + /** + * The number of records in the file. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalRecordCount?: number; + /** + * The number of records that have passed validation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validRecordCount?: number; + /** + * The time the files associated with this import are deleted from the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly filesValidUntilTimeUTC?: Date; + /** + * The time the file import record is soft deleted from the database and history. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly importValidUntilTimeUTC?: Date; +} + /** Consent for Office365 tenant that already made. */ export interface OfficeConsent extends Resource { /** The tenantId of the Office365 with the consent. */ @@ -2195,6 +2334,13 @@ export interface ActionRequestProperties extends ActionPropertiesBase { triggerUri: string; } +/** Describes an automation rule condition that applies a boolean operator (e.g AND, OR) to conditions */ +export interface BooleanConditionProperties extends AutomationRuleCondition { + /** Polymorphic discriminator, which specifies the different types this object can be */ + conditionType: "Boolean"; + conditionProperties?: AutomationRuleBooleanCondition; +} + /** Describes an automation rule condition that evaluates an array property's value change */ export interface PropertyArrayChangedConditionProperties extends AutomationRuleCondition { @@ -2203,6 +2349,14 @@ export interface PropertyArrayChangedConditionProperties conditionProperties?: AutomationRulePropertyArrayChangedValuesCondition; } +/** Describes an automation rule condition that evaluates an array property's value */ +export interface PropertyArrayConditionProperties + extends AutomationRuleCondition { + /** Polymorphic discriminator, which specifies the different types this object can be */ + conditionType: "PropertyArray"; + conditionProperties?: AutomationRulePropertyArrayValuesCondition; +} + /** Describes an automation rule condition that evaluates a property's value change */ export interface PropertyChangedConditionProperties extends AutomationRuleCondition { @@ -2325,6 +2479,13 @@ export interface SecurityAlertTimelineItem extends EntityTimelineItem { timeGenerated: Date; /** The name of the alert type. */ alertType: string; + /** + * The intent of the alert. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly intent?: KillChainIntent; + /** The techniques of the alert. */ + techniques?: string[]; } /** Represents Insight Query. */ @@ -4403,6 +4564,8 @@ export interface ScheduledAlertRuleTemplate extends AlertRuleTemplate { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } /** Represents NRT alert rule template. */ @@ -4443,6 +4606,10 @@ export interface NrtAlertRuleTemplate extends AlertRuleTemplate { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** The event grouping settings. */ + eventGroupingSettings?: EventGroupingSettings; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } /** Represents a security alert entity. */ @@ -5800,6 +5967,8 @@ export interface ScheduledAlertRule extends AlertRule { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; /** The Name of the alert rule template used to create this rule. */ alertRuleTemplateName?: string; /** The version of the alert rule template used to create this rule - in format , where all are numbers, for example 0 <1.0.2> */ @@ -5864,6 +6033,10 @@ export interface NrtAlertRule extends AlertRule { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** The event grouping settings. */ + eventGroupingSettings?: EventGroupingSettings; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } /** Represents Expansion entity query. */ @@ -6369,10 +6542,14 @@ export type TriggersWhen = string; export enum KnownConditionType { /** Evaluate an object property value */ Property = "Property", + /** Evaluate an object array property value */ + PropertyArray = "PropertyArray", /** Evaluate an object property changed value */ PropertyChanged = "PropertyChanged", /** Evaluate an object array property changed value */ - PropertyArrayChanged = "PropertyArrayChanged" + PropertyArrayChanged = "PropertyArrayChanged", + /** Apply a boolean operator (e.g AND, OR) to conditions */ + Boolean = "Boolean" } /** @@ -6381,8 +6558,10 @@ export enum KnownConditionType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Property**: Evaluate an object property value \ + * **PropertyArray**: Evaluate an object array property value \ * **PropertyChanged**: Evaluate an object property changed value \ - * **PropertyArrayChanged**: Evaluate an object array property changed value + * **PropertyArrayChanged**: Evaluate an object array property changed value \ + * **Boolean**: Apply a boolean operator (e.g AND, OR) to conditions */ export type ConditionType = string; @@ -6692,6 +6871,123 @@ export enum KnownEntityQueryTemplateKind { */ export type EntityQueryTemplateKind = string; +/** Known values of {@link IngestionMode} that the service accepts. */ +export enum KnownIngestionMode { + /** No records should be ingested when invalid records are detected. */ + IngestOnlyIfAllAreValid = "IngestOnlyIfAllAreValid", + /** Valid records should still be ingested when invalid records are detected. */ + IngestAnyValidRecords = "IngestAnyValidRecords", + /** Unspecified */ + Unspecified = "Unspecified" +} + +/** + * Defines values for IngestionMode. \ + * {@link KnownIngestionMode} can be used interchangeably with IngestionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IngestOnlyIfAllAreValid**: No records should be ingested when invalid records are detected. \ + * **IngestAnyValidRecords**: Valid records should still be ingested when invalid records are detected. \ + * **Unspecified**: Unspecified + */ +export type IngestionMode = string; + +/** Known values of {@link FileImportContentType} that the service accepts. */ +export enum KnownFileImportContentType { + /** File containing records with the core fields of an indicator, plus the observables to construct the STIX pattern. */ + BasicIndicator = "BasicIndicator", + /** File containing STIX indicators. */ + StixIndicator = "StixIndicator", + /** File containing other records. */ + Unspecified = "Unspecified" +} + +/** + * Defines values for FileImportContentType. \ + * {@link KnownFileImportContentType} can be used interchangeably with FileImportContentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BasicIndicator**: File containing records with the core fields of an indicator, plus the observables to construct the STIX pattern. \ + * **StixIndicator**: File containing STIX indicators. \ + * **Unspecified**: File containing other records. + */ +export type FileImportContentType = string; + +/** Known values of {@link FileFormat} that the service accepts. */ +export enum KnownFileFormat { + /** A CSV file. */ + CSV = "CSV", + /** A JSON file. */ + Json = "JSON", + /** A file of other format. */ + Unspecified = "Unspecified" +} + +/** + * Defines values for FileFormat. \ + * {@link KnownFileFormat} can be used interchangeably with FileFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CSV**: A CSV file. \ + * **JSON**: A JSON file. \ + * **Unspecified**: A file of other format. + */ +export type FileFormat = string; + +/** Known values of {@link DeleteStatus} that the service accepts. */ +export enum KnownDeleteStatus { + /** The file was deleted. */ + Deleted = "Deleted", + /** The file was not deleted. */ + NotDeleted = "NotDeleted", + /** Unspecified */ + Unspecified = "Unspecified" +} + +/** + * Defines values for DeleteStatus. \ + * {@link KnownDeleteStatus} can be used interchangeably with DeleteStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Deleted**: The file was deleted. \ + * **NotDeleted**: The file was not deleted. \ + * **Unspecified**: Unspecified + */ +export type DeleteStatus = string; + +/** Known values of {@link FileImportState} that the service accepts. */ +export enum KnownFileImportState { + /** A fatal error has occurred while ingesting the file. */ + FatalError = "FatalError", + /** The file has been ingested. */ + Ingested = "Ingested", + /** The file has been ingested with errors. */ + IngestedWithErrors = "IngestedWithErrors", + /** The file ingestion is in progress. */ + InProgress = "InProgress", + /** The file is invalid. */ + Invalid = "Invalid", + /** Waiting for the file to be uploaded. */ + WaitingForUpload = "WaitingForUpload", + /** Unspecified state. */ + Unspecified = "Unspecified" +} + +/** + * Defines values for FileImportState. \ + * {@link KnownFileImportState} can be used interchangeably with FileImportState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FatalError**: A fatal error has occurred while ingesting the file. \ + * **Ingested**: The file has been ingested. \ + * **IngestedWithErrors**: The file has been ingested with errors. \ + * **InProgress**: The file ingestion is in progress. \ + * **Invalid**: The file is invalid. \ + * **WaitingForUpload**: Waiting for the file to be uploaded. \ + * **Unspecified**: Unspecified state. + */ +export type FileImportState = string; + /** Known values of {@link IncidentClassification} that the service accepts. */ export enum KnownIncidentClassification { /** Incident classification was undetermined */ @@ -7508,6 +7804,63 @@ export enum KnownEntityMappingType { */ export type EntityMappingType = string; +/** Known values of {@link AlertProperty} that the service accepts. */ +export enum KnownAlertProperty { + /** Alert's link */ + AlertLink = "AlertLink", + /** Confidence level property */ + ConfidenceLevel = "ConfidenceLevel", + /** Confidence score */ + ConfidenceScore = "ConfidenceScore", + /** Extended links to the alert */ + ExtendedLinks = "ExtendedLinks", + /** Product name alert property */ + ProductName = "ProductName", + /** Provider name alert property */ + ProviderName = "ProviderName", + /** Product component name alert property */ + ProductComponentName = "ProductComponentName", + /** Remediation steps alert property */ + RemediationSteps = "RemediationSteps", + /** Techniques alert property */ + Techniques = "Techniques" +} + +/** + * Defines values for AlertProperty. \ + * {@link KnownAlertProperty} can be used interchangeably with AlertProperty, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AlertLink**: Alert's link \ + * **ConfidenceLevel**: Confidence level property \ + * **ConfidenceScore**: Confidence score \ + * **ExtendedLinks**: Extended links to the alert \ + * **ProductName**: Product name alert property \ + * **ProviderName**: Provider name alert property \ + * **ProductComponentName**: Product component name alert property \ + * **RemediationSteps**: Remediation steps alert property \ + * **Techniques**: Techniques alert property + */ +export type AlertProperty = string; + +/** Known values of {@link EventGroupingAggregationKind} that the service accepts. */ +export enum KnownEventGroupingAggregationKind { + /** SingleAlert */ + SingleAlert = "SingleAlert", + /** AlertPerResult */ + AlertPerResult = "AlertPerResult" +} + +/** + * Defines values for EventGroupingAggregationKind. \ + * {@link KnownEventGroupingAggregationKind} can be used interchangeably with EventGroupingAggregationKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleAlert** \ + * **AlertPerResult** + */ +export type EventGroupingAggregationKind = string; + /** Known values of {@link MicrosoftSecurityProductName} that the service accepts. */ export enum KnownMicrosoftSecurityProductName { /** MicrosoftCloudAppSecurity */ @@ -7580,23 +7933,23 @@ export enum KnownAlertDetail { */ export type AlertDetail = string; -/** Known values of {@link EventGroupingAggregationKind} that the service accepts. */ -export enum KnownEventGroupingAggregationKind { - /** SingleAlert */ - SingleAlert = "SingleAlert", - /** AlertPerResult */ - AlertPerResult = "AlertPerResult" +/** Known values of {@link AutomationRuleBooleanConditionSupportedOperator} that the service accepts. */ +export enum KnownAutomationRuleBooleanConditionSupportedOperator { + /** Evaluates as true if all the item conditions are evaluated as true */ + And = "And", + /** Evaluates as true if at least one of the item conditions are evaluated as true */ + Or = "Or" } /** - * Defines values for EventGroupingAggregationKind. \ - * {@link KnownEventGroupingAggregationKind} can be used interchangeably with EventGroupingAggregationKind, + * Defines values for AutomationRuleBooleanConditionSupportedOperator. \ + * {@link KnownAutomationRuleBooleanConditionSupportedOperator} can be used interchangeably with AutomationRuleBooleanConditionSupportedOperator, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **SingleAlert** \ - * **AlertPerResult** + * **And**: Evaluates as true if all the item conditions are evaluated as true \ + * **Or**: Evaluates as true if at least one of the item conditions are evaluated as true */ -export type EventGroupingAggregationKind = string; +export type AutomationRuleBooleanConditionSupportedOperator = string; /** Known values of {@link AutomationRulePropertyArrayChangedConditionSupportedArrayType} that the service accepts. */ export enum KnownAutomationRulePropertyArrayChangedConditionSupportedArrayType { @@ -7637,6 +7990,39 @@ export enum KnownAutomationRulePropertyArrayChangedConditionSupportedChangeType */ export type AutomationRulePropertyArrayChangedConditionSupportedChangeType = string; +/** Known values of {@link AutomationRulePropertyArrayConditionSupportedArrayType} that the service accepts. */ +export enum KnownAutomationRulePropertyArrayConditionSupportedArrayType { + /** Evaluate the condition on the custom detail keys */ + CustomDetails = "CustomDetails", + /** Evaluate the condition on a custom detail's values */ + CustomDetailValues = "CustomDetailValues" +} + +/** + * Defines values for AutomationRulePropertyArrayConditionSupportedArrayType. \ + * {@link KnownAutomationRulePropertyArrayConditionSupportedArrayType} can be used interchangeably with AutomationRulePropertyArrayConditionSupportedArrayType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CustomDetails**: Evaluate the condition on the custom detail keys \ + * **CustomDetailValues**: Evaluate the condition on a custom detail's values + */ +export type AutomationRulePropertyArrayConditionSupportedArrayType = string; + +/** Known values of {@link AutomationRulePropertyArrayConditionSupportedArrayConditionType} that the service accepts. */ +export enum KnownAutomationRulePropertyArrayConditionSupportedArrayConditionType { + /** Evaluate the condition as true if any item fulfills it */ + AnyItem = "AnyItem" +} + +/** + * Defines values for AutomationRulePropertyArrayConditionSupportedArrayConditionType. \ + * {@link KnownAutomationRulePropertyArrayConditionSupportedArrayConditionType} can be used interchangeably with AutomationRulePropertyArrayConditionSupportedArrayConditionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AnyItem**: Evaluate the condition as true if any item fulfills it + */ +export type AutomationRulePropertyArrayConditionSupportedArrayConditionType = string; + /** Known values of {@link AutomationRulePropertyChangedConditionSupportedPropertyType} that the service accepts. */ export enum KnownAutomationRulePropertyChangedConditionSupportedPropertyType { /** Evaluate the condition on the incident severity */ @@ -7730,6 +8116,12 @@ export enum KnownAutomationRulePropertyConditionSupportedProperty { IncidentLabel = "IncidentLabel", /** The provider name of the incident */ IncidentProviderName = "IncidentProviderName", + /** The update source of the incident */ + IncidentUpdatedBySource = "IncidentUpdatedBySource", + /** The incident custom detail key */ + IncidentCustomDetailsKey = "IncidentCustomDetailsKey", + /** The incident custom detail value */ + IncidentCustomDetailsValue = "IncidentCustomDetailsValue", /** The account Azure Active Directory tenant id */ AccountAadTenantId = "AccountAadTenantId", /** The account Azure Active Directory user id */ @@ -7839,6 +8231,9 @@ export enum KnownAutomationRulePropertyConditionSupportedProperty { * **IncidentTactics**: The tactics of the incident \ * **IncidentLabel**: The labels of the incident \ * **IncidentProviderName**: The provider name of the incident \ + * **IncidentUpdatedBySource**: The update source of the incident \ + * **IncidentCustomDetailsKey**: The incident custom detail key \ + * **IncidentCustomDetailsValue**: The incident custom detail value \ * **AccountAadTenantId**: The account Azure Active Directory tenant id \ * **AccountAadUserId**: The account Azure Active Directory user id \ * **AccountName**: The account name \ @@ -8813,6 +9208,64 @@ export interface EntityQueryTemplatesListNextOptionalParams /** Contains response data for the listNext operation. */ export type EntityQueryTemplatesListNextResponse = EntityQueryTemplateList; +/** Optional parameters. */ +export interface FileImportsListOptionalParams + extends coreClient.OperationOptions { + /** Filters the results, based on a Boolean condition. Optional. */ + filter?: string; + /** Sorts the results. Optional. */ + orderby?: string; + /** Returns only the first n results. Optional. */ + top?: number; + /** Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. Optional. */ + skipToken?: string; +} + +/** Contains response data for the list operation. */ +export type FileImportsListResponse = FileImportList; + +/** Optional parameters. */ +export interface FileImportsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type FileImportsGetResponse = FileImport; + +/** Optional parameters. */ +export interface FileImportsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type FileImportsCreateResponse = FileImport; + +/** Optional parameters. */ +export interface FileImportsDeleteOptionalParams + 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 delete operation. */ +export type FileImportsDeleteResponse = FileImport; + +/** Optional parameters. */ +export interface FileImportsListNextOptionalParams + extends coreClient.OperationOptions { + /** Filters the results, based on a Boolean condition. Optional. */ + filter?: string; + /** Sorts the results. Optional. */ + orderby?: string; + /** Returns only the first n results. Optional. */ + top?: number; + /** Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. Optional. */ + skipToken?: string; +} + +/** Contains response data for the listNext operation. */ +export type FileImportsListNextResponse = FileImportList; + /** Optional parameters. */ export interface IncidentCommentsListOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts b/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts index 6a5a7d831fa4..c1f5028c5c78 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts @@ -405,6 +405,7 @@ export const ManualTriggerRequestBody: coreClient.CompositeMapper = { }, logicAppsResourceId: { serializedName: "logicAppsResourceId", + required: true, type: { name: "String" } @@ -1783,6 +1784,103 @@ export const EntityQueryTemplateList: coreClient.CompositeMapper = { } }; +export const FileImportList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileImportList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FileImport" + } + } + } + } + } + } +}; + +export const FileMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileMetadata", + modelProperties: { + fileFormat: { + serializedName: "fileFormat", + type: { + name: "String" + } + }, + fileName: { + serializedName: "fileName", + type: { + name: "String" + } + }, + fileSize: { + serializedName: "fileSize", + type: { + name: "Number" + } + }, + fileContentUri: { + serializedName: "fileContentUri", + readOnly: true, + type: { + name: "String" + } + }, + deleteStatus: { + serializedName: "deleteStatus", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ValidationError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationError", + modelProperties: { + recordIndex: { + serializedName: "recordIndex", + type: { + name: "Number" + } + }, + errorMessages: { + serializedName: "errorMessages", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const IncidentList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3715,6 +3813,25 @@ export const QueryBasedAlertRuleTemplateProperties: coreClient.CompositeMapper = name: "Composite", className: "AlertDetailsOverride" } + }, + eventGroupingSettings: { + serializedName: "eventGroupingSettings", + type: { + name: "Composite", + className: "EventGroupingSettings" + } + }, + sentinelEntitiesMappings: { + serializedName: "sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -3796,6 +3913,69 @@ export const AlertDetailsOverride: coreClient.CompositeMapper = { type: { name: "String" } + }, + alertDynamicProperties: { + serializedName: "alertDynamicProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AlertPropertyMapping" + } + } + } + } + } + } +}; + +export const AlertPropertyMapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AlertPropertyMapping", + modelProperties: { + alertProperty: { + serializedName: "alertProperty", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const EventGroupingSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventGroupingSettings", + modelProperties: { + aggregationKind: { + serializedName: "aggregationKind", + type: { + name: "String" + } + } + } + } +}; + +export const SentinelEntityMapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SentinelEntityMapping", + modelProperties: { + columnName: { + serializedName: "columnName", + type: { + name: "String" + } } } } @@ -4248,21 +4428,49 @@ export const ScheduledAlertRuleCommonProperties: coreClient.CompositeMapper = { name: "Composite", className: "AlertDetailsOverride" } + }, + sentinelEntitiesMappings: { + serializedName: "sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } }; -export const EventGroupingSettings: coreClient.CompositeMapper = { +export const AutomationRuleBooleanCondition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EventGroupingSettings", + className: "AutomationRuleBooleanCondition", modelProperties: { - aggregationKind: { - serializedName: "aggregationKind", + operator: { + serializedName: "operator", type: { name: "String" } + }, + innerConditions: { + constraints: { + MinItems: 2, + MaxItems: 10 + }, + serializedName: "innerConditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationRuleCondition" + } + } + } } } } @@ -4347,6 +4555,42 @@ export const AutomationRulePropertyArrayChangedValuesCondition: coreClient.Compo } }; +export const AutomationRulePropertyArrayValuesCondition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AutomationRulePropertyArrayValuesCondition", + modelProperties: { + arrayType: { + serializedName: "arrayType", + type: { + name: "String" + } + }, + arrayConditionType: { + serializedName: "arrayConditionType", + type: { + name: "String" + } + }, + itemConditions: { + constraints: { + MaxItems: 10 + }, + serializedName: "itemConditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutomationRuleCondition" + } + } + } + } + } + } +}; + export const AutomationRulePropertyValuesChangedCondition: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5949,6 +6193,110 @@ export const EntityQueryTemplate: coreClient.CompositeMapper = { } }; +export const FileImport: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileImport", + modelProperties: { + ...Resource.type.modelProperties, + ingestionMode: { + serializedName: "properties.ingestionMode", + type: { + name: "String" + } + }, + contentType: { + serializedName: "properties.contentType", + type: { + name: "String" + } + }, + createdTimeUTC: { + serializedName: "properties.createdTimeUTC", + readOnly: true, + type: { + name: "DateTime" + } + }, + errorFile: { + serializedName: "properties.errorFile", + type: { + name: "Composite", + className: "FileMetadata" + } + }, + errorsPreview: { + serializedName: "properties.errorsPreview", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidationError" + } + } + } + }, + importFile: { + serializedName: "properties.importFile", + type: { + name: "Composite", + className: "FileMetadata" + } + }, + ingestedRecordCount: { + serializedName: "properties.ingestedRecordCount", + readOnly: true, + type: { + name: "Number" + } + }, + source: { + serializedName: "properties.source", + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + readOnly: true, + type: { + name: "String" + } + }, + totalRecordCount: { + serializedName: "properties.totalRecordCount", + readOnly: true, + type: { + name: "Number" + } + }, + validRecordCount: { + serializedName: "properties.validRecordCount", + readOnly: true, + type: { + name: "Number" + } + }, + filesValidUntilTimeUTC: { + serializedName: "properties.filesValidUntilTimeUTC", + readOnly: true, + type: { + name: "DateTime" + } + }, + importValidUntilTimeUTC: { + serializedName: "properties.importValidUntilTimeUTC", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + export const OfficeConsent: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6004,6 +6352,27 @@ export const ActionRequestProperties: coreClient.CompositeMapper = { } }; +export const BooleanConditionProperties: coreClient.CompositeMapper = { + serializedName: "Boolean", + type: { + name: "Composite", + className: "BooleanConditionProperties", + uberParent: "AutomationRuleCondition", + polymorphicDiscriminator: + AutomationRuleCondition.type.polymorphicDiscriminator, + modelProperties: { + ...AutomationRuleCondition.type.modelProperties, + conditionProperties: { + serializedName: "conditionProperties", + type: { + name: "Composite", + className: "AutomationRuleBooleanCondition" + } + } + } + } +}; + export const PropertyArrayChangedConditionProperties: coreClient.CompositeMapper = { serializedName: "PropertyArrayChanged", type: { @@ -6025,6 +6394,27 @@ export const PropertyArrayChangedConditionProperties: coreClient.CompositeMapper } }; +export const PropertyArrayConditionProperties: coreClient.CompositeMapper = { + serializedName: "PropertyArray", + type: { + name: "Composite", + className: "PropertyArrayConditionProperties", + uberParent: "AutomationRuleCondition", + polymorphicDiscriminator: + AutomationRuleCondition.type.polymorphicDiscriminator, + modelProperties: { + ...AutomationRuleCondition.type.modelProperties, + conditionProperties: { + serializedName: "conditionProperties", + type: { + name: "Composite", + className: "AutomationRulePropertyArrayValuesCondition" + } + } + } + } +}; + export const PropertyChangedConditionProperties: coreClient.CompositeMapper = { serializedName: "PropertyChanged", type: { @@ -6402,6 +6792,24 @@ export const SecurityAlertTimelineItem: coreClient.CompositeMapper = { type: { name: "String" } + }, + intent: { + serializedName: "intent", + readOnly: true, + type: { + name: "String" + } + }, + techniques: { + serializedName: "techniques", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -11354,6 +11762,18 @@ export const ScheduledAlertRuleTemplate: coreClient.CompositeMapper = { name: "Composite", className: "AlertDetailsOverride" } + }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -11483,6 +11903,25 @@ export const NrtAlertRuleTemplate: coreClient.CompositeMapper = { name: "Composite", className: "AlertDetailsOverride" } + }, + eventGroupingSettings: { + serializedName: "properties.eventGroupingSettings", + type: { + name: "Composite", + className: "EventGroupingSettings" + } + }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -14083,6 +14522,18 @@ export const ScheduledAlertRule: coreClient.CompositeMapper = { className: "AlertDetailsOverride" } }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } + }, alertRuleTemplateName: { serializedName: "properties.alertRuleTemplateName", type: { @@ -14289,6 +14740,25 @@ export const NrtAlertRule: coreClient.CompositeMapper = { name: "Composite", className: "AlertDetailsOverride" } + }, + eventGroupingSettings: { + serializedName: "properties.eventGroupingSettings", + type: { + name: "Composite", + className: "EventGroupingSettings" + } + }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -15627,7 +16097,9 @@ export let discriminators = { "Resource.AlertRuleTemplate": AlertRuleTemplate, "Resource.Entity": Entity, "Resource.EntityQueryTemplate": EntityQueryTemplate, + "AutomationRuleCondition.Boolean": BooleanConditionProperties, "AutomationRuleCondition.PropertyArrayChanged": PropertyArrayChangedConditionProperties, + "AutomationRuleCondition.PropertyArray": PropertyArrayConditionProperties, "AutomationRuleCondition.PropertyChanged": PropertyChangedConditionProperties, "AutomationRuleCondition.Property": PropertyConditionProperties, "AutomationRuleAction.ModifyProperties": AutomationRuleModifyPropertiesAction, diff --git a/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts b/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts index 6cc47755758b..8b833a37c6da 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts @@ -25,6 +25,7 @@ import { EntityGetInsightsParameters as EntityGetInsightsParametersMapper, EntityTimelineParameters as EntityTimelineParametersMapper, CustomEntityQuery as CustomEntityQueryMapper, + FileImport as FileImportMapper, IncidentComment as IncidentCommentMapper, MetadataModel as MetadataModelMapper, MetadataPatch as MetadataPatchMapper, @@ -69,7 +70,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-07-01-preview", + defaultValue: "2022-10-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -427,6 +428,22 @@ export const entityQueryTemplateId: OperationURLParameter = { } }; +export const fileImportId: OperationURLParameter = { + parameterPath: "fileImportId", + mapper: { + serializedName: "fileImportId", + required: true, + type: { + name: "String" + } + } +}; + +export const fileImport: OperationParameter = { + parameterPath: "fileImport", + mapper: FileImportMapper +}; + export const incidentCommentId: OperationURLParameter = { parameterPath: "incidentCommentId", mapper: { diff --git a/sdk/securityinsight/arm-securityinsight/src/operations/fileImports.ts b/sdk/securityinsight/arm-securityinsight/src/operations/fileImports.ts new file mode 100644 index 000000000000..85d011403732 --- /dev/null +++ b/sdk/securityinsight/arm-securityinsight/src/operations/fileImports.ts @@ -0,0 +1,410 @@ +/* + * 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 { FileImports } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SecurityInsights } from "../securityInsights"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + FileImport, + FileImportsListNextOptionalParams, + FileImportsListOptionalParams, + FileImportsListResponse, + FileImportsGetOptionalParams, + FileImportsGetResponse, + FileImportsCreateOptionalParams, + FileImportsCreateResponse, + FileImportsDeleteOptionalParams, + FileImportsDeleteResponse, + FileImportsListNextResponse +} from "../models"; + +/// +/** Class containing FileImports operations. */ +export class FileImportsImpl implements FileImports { + private readonly client: SecurityInsights; + + /** + * Initialize a new instance of the class FileImports class. + * @param client Reference to the service client + */ + constructor(client: SecurityInsights) { + this.client = client; + } + + /** + * Gets all file imports. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + workspaceName: string, + options?: FileImportsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, workspaceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, workspaceName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + workspaceName: string, + options?: FileImportsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, workspaceName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + workspaceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + workspaceName: string, + options?: FileImportsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + workspaceName, + options + )) { + yield* page; + } + } + + /** + * Gets all file imports. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + workspaceName: string, + options?: FileImportsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + listOperationSpec + ); + } + + /** + * Gets a file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param options The options parameters. + */ + get( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + options?: FileImportsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, fileImportId, options }, + getOperationSpec + ); + } + + /** + * Creates the file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param fileImport The file import + * @param options The options parameters. + */ + create( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + fileImport: FileImport, + options?: FileImportsCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, fileImportId, fileImport, options }, + createOperationSpec + ); + } + + /** + * Delete the file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + options?: FileImportsDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + FileImportsDeleteResponse + > + > { + 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, workspaceName, fileImportId, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete the file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + options?: FileImportsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + workspaceName, + fileImportId, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + workspaceName: string, + nextLink: string, + options?: FileImportsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileImportList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.orderby, + Parameters.top, + Parameters.skipToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileImport + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.fileImportId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}", + httpMethod: "PUT", + responses: { + 201: { + bodyMapper: Mappers.FileImport + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.fileImport, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.fileImportId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.FileImport + }, + 201: { + bodyMapper: Mappers.FileImport + }, + 202: { + bodyMapper: Mappers.FileImport + }, + 204: { + bodyMapper: Mappers.FileImport + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.fileImportId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileImportList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.orderby, + Parameters.top, + Parameters.skipToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/securityinsight/arm-securityinsight/src/operations/index.ts b/sdk/securityinsight/arm-securityinsight/src/operations/index.ts index 953a63a9a9d9..6f66d834535e 100644 --- a/sdk/securityinsight/arm-securityinsight/src/operations/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/operations/index.ts @@ -22,6 +22,7 @@ export * from "./entitiesRelations"; export * from "./entityRelations"; export * from "./entityQueries"; export * from "./entityQueryTemplates"; +export * from "./fileImports"; export * from "./incidentComments"; export * from "./incidentRelations"; export * from "./metadata"; diff --git a/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/fileImports.ts b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/fileImports.ts new file mode 100644 index 000000000000..4cd0209b551b --- /dev/null +++ b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/fileImports.ts @@ -0,0 +1,95 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + FileImport, + FileImportsListOptionalParams, + FileImportsGetOptionalParams, + FileImportsGetResponse, + FileImportsCreateOptionalParams, + FileImportsCreateResponse, + FileImportsDeleteOptionalParams, + FileImportsDeleteResponse +} from "../models"; + +/// +/** Interface representing a FileImports. */ +export interface FileImports { + /** + * Gets all file imports. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + workspaceName: string, + options?: FileImportsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param options The options parameters. + */ + get( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + options?: FileImportsGetOptionalParams + ): Promise; + /** + * Creates the file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param fileImport The file import + * @param options The options parameters. + */ + create( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + fileImport: FileImport, + options?: FileImportsCreateOptionalParams + ): Promise; + /** + * Delete the file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + options?: FileImportsDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + FileImportsDeleteResponse + > + >; + /** + * Delete the file import. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param fileImportId File import ID + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + workspaceName: string, + fileImportId: string, + options?: FileImportsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts index 953a63a9a9d9..6f66d834535e 100644 --- a/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts @@ -22,6 +22,7 @@ export * from "./entitiesRelations"; export * from "./entityRelations"; export * from "./entityQueries"; export * from "./entityQueryTemplates"; +export * from "./fileImports"; export * from "./incidentComments"; export * from "./incidentRelations"; export * from "./metadata"; diff --git a/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts b/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts index c14ec96746b3..27d89c60314f 100644 --- a/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts +++ b/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts @@ -31,6 +31,7 @@ import { EntityRelationsImpl, EntityQueriesImpl, EntityQueryTemplatesImpl, + FileImportsImpl, IncidentCommentsImpl, IncidentRelationsImpl, MetadataImpl, @@ -66,6 +67,7 @@ import { EntityRelations, EntityQueries, EntityQueryTemplates, + FileImports, IncidentComments, IncidentRelations, Metadata, @@ -138,41 +140,34 @@ export class SecurityInsights extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-07-01-preview"; + this.apiVersion = options.apiVersion || "2022-10-01-preview"; this.alertRules = new AlertRulesImpl(this); this.actions = new ActionsImpl(this); this.alertRuleTemplates = new AlertRuleTemplatesImpl(this); @@ -189,6 +184,7 @@ export class SecurityInsights extends coreClient.ServiceClient { this.entityRelations = new EntityRelationsImpl(this); this.entityQueries = new EntityQueriesImpl(this); this.entityQueryTemplates = new EntityQueryTemplatesImpl(this); + this.fileImports = new FileImportsImpl(this); this.incidentComments = new IncidentCommentsImpl(this); this.incidentRelations = new IncidentRelationsImpl(this); this.metadata = new MetadataImpl(this); @@ -263,6 +259,7 @@ export class SecurityInsights extends coreClient.ServiceClient { entityRelations: EntityRelations; entityQueries: EntityQueries; entityQueryTemplates: EntityQueryTemplates; + fileImports: FileImports; incidentComments: IncidentComments; incidentRelations: IncidentRelations; metadata: Metadata; diff --git a/sdk/securityinsight/arm-securityinsight/tsconfig.json b/sdk/securityinsight/arm-securityinsight/tsconfig.json index 6c7875caddba..3e6ae96443f3 100644 --- a/sdk/securityinsight/arm-securityinsight/tsconfig.json +++ b/sdk/securityinsight/arm-securityinsight/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-securityinsight": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"