From 1f609ec8b6eae6b88fe283fa6c0d4b6a4f9e0e2e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 18 Aug 2022 10:08:39 +0000 Subject: [PATCH] CodeGen from PR 20290 in Azure/azure-rest-api-specs Merge dd3a8df9502419c3da21ec75f56fe02b571ad4dc into 08560e03b3b5dcfba6afaf2b166b3a78d32f2770 --- .../arm-securityinsight/CHANGELOG.md | 42 +- .../arm-securityinsight/_meta.json | 8 +- .../arm-securityinsight/package.json | 14 +- .../review/arm-securityinsight.api.md | 150 +++++++ .../arm-securityinsight/src/lroImpl.ts | 34 ++ .../arm-securityinsight/src/models/index.ts | 274 ++++++++++++ .../arm-securityinsight/src/models/mappers.ts | 201 +++++++++ .../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 +- 14 files changed, 1246 insertions(+), 56 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/sdk/securityinsight/arm-securityinsight/CHANGELOG.md b/sdk/securityinsight/arm-securityinsight/CHANGELOG.md index 457f3dc6179b..78fb0aad5494 100644 --- a/sdk/securityinsight/arm-securityinsight/CHANGELOG.md +++ b/sdk/securityinsight/arm-securityinsight/CHANGELOG.md @@ -1,15 +1,37 @@ # Release History + +## 1.0.0-beta.5 (2022-08-18) + +**Features** -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group FileImports + - 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 ValidationError + - 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 + - Class SecurityInsights has a new parameter fileImports + - Added Enum KnownDeleteStatus + - Added Enum KnownFileFormat + - Added Enum KnownFileImportContentType + - Added Enum KnownFileImportState + - Added Enum KnownIngestionMode + + ## 1.0.0-beta.4 (2022-07-11) **Features** diff --git a/sdk/securityinsight/arm-securityinsight/_meta.json b/sdk/securityinsight/arm-securityinsight/_meta.json index 3a1a3722b6bc..ec6e180e882e 100644 --- a/sdk/securityinsight/arm-securityinsight/_meta.json +++ b/sdk/securityinsight/arm-securityinsight/_meta.json @@ -1,8 +1,8 @@ { - "commit": "64496bd64b0376dc4b45e3193a39f7bcdd4b28da", + "commit": "246574aabeb7064d4320bd66cbc384ac87cfc374", "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 c2561caed140..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", @@ -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..6d4ae0af09cf 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 { @@ -1175,6 +1177,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 +1778,9 @@ export interface FileEntityProperties extends EntityCommonProperties { readonly hostEntityId?: string; } +// @public +export type FileFormat = string; + // @public export type FileHashAlgorithm = string; @@ -1792,6 +1800,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 +2410,9 @@ export type IncidentsRunPlaybookResponse = Record; // @public export type IncidentStatus = string; +// @public +export type IngestionMode = string; + // @public export interface InsightQueryItem extends EntityQueryItem { kind: "Insight"; @@ -2777,6 +2880,13 @@ export enum KnownDataTypeState { Enabled = "Enabled" } +// @public +export enum KnownDeleteStatus { + Deleted = "Deleted", + NotDeleted = "NotDeleted", + Unspecified = "Unspecified" +} + // @public export enum KnownDeploymentFetchStatus { NotFound = "NotFound", @@ -2924,6 +3034,13 @@ export enum KnownEventGroupingAggregationKind { SingleAlert = "SingleAlert" } +// @public +export enum KnownFileFormat { + CSV = "CSV", + Json = "JSON", + Unspecified = "Unspecified" +} + // @public export enum KnownFileHashAlgorithm { MD5 = "MD5", @@ -2933,6 +3050,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 +3110,13 @@ export enum KnownIncidentStatus { New = "New" } +// @public +export enum KnownIngestionMode { + IngestAnyValidRecords = "IngestAnyValidRecords", + IngestOnlyIfAllAreValid = "IngestOnlyIfAllAreValid", + Unspecified = "Unspecified" +} + // @public export enum KnownKillChainIntent { Collection = "Collection", @@ -4474,6 +4616,8 @@ export class SecurityInsights extends coreClient.ServiceClient { // (undocumented) entityRelations: EntityRelations; // (undocumented) + fileImports: FileImports; + // (undocumented) incidentComments: IncidentComments; // (undocumented) incidentRelations: IncidentRelations; @@ -5253,6 +5397,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..200ef7a39074 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/index.ts @@ -725,6 +725,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 { /** @@ -2175,6 +2217,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. */ @@ -6692,6 +6791,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 */ @@ -8813,6 +9029,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..bf6f991c376c 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts @@ -1783,6 +1783,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", @@ -5949,6 +6046,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", diff --git a/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts b/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts index 6cc47755758b..7c1600857069 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-08-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..dc8a4e16a15e 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-08-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"