diff --git a/sdk/securityinsight/arm-securityinsight/CHANGELOG.md b/sdk/securityinsight/arm-securityinsight/CHANGELOG.md index d41abf445193..1ffb62636536 100644 --- a/sdk/securityinsight/arm-securityinsight/CHANGELOG.md +++ b/sdk/securityinsight/arm-securityinsight/CHANGELOG.md @@ -1,15 +1,41 @@ # Release History + +## 1.0.0-beta.6 (2022-10-25) + +**Features** -## 1.0.0-beta.6 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group WorkspaceManagerGroups + - Added Interface AlertPropertyMapping + - Added Interface AzureEntityResource + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface SentinelEntityMapping + - Added Interface WorkspaceManagerGroup + - Added Interface WorkspaceManagerGroupList + - Added Interface WorkspaceManagerGroupsCreateOrUpdateOptionalParams + - Added Interface WorkspaceManagerGroupsDeleteOptionalParams + - Added Interface WorkspaceManagerGroupsGetOptionalParams + - Added Interface WorkspaceManagerGroupsListNextOptionalParams + - Added Interface WorkspaceManagerGroupsListOptionalParams + - Added Type Alias AlertProperty + - Added Type Alias WorkspaceManagerGroupsCreateOrUpdateResponse + - Added Type Alias WorkspaceManagerGroupsGetResponse + - Added Type Alias WorkspaceManagerGroupsListNextResponse + - Added Type Alias WorkspaceManagerGroupsListResponse + - Interface AlertDetailsOverride has a new optional parameter alertDynamicProperties + - Interface NrtAlertRule has a new optional parameter sentinelEntitiesMappings + - Interface NrtAlertRuleTemplate has a new optional parameter sentinelEntitiesMappings + - 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 workspaceManagerGroups + - Added Enum KnownAlertProperty + + ## 1.0.0-beta.5 (2022-09-27) **Features** diff --git a/sdk/securityinsight/arm-securityinsight/README.md b/sdk/securityinsight/arm-securityinsight/README.md index 7181392099b1..d4b3978f58fa 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://nodejs.org/about/releases/) +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) - 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 efd1ec43a862..aa522c3910d2 100644 --- a/sdk/securityinsight/arm-securityinsight/_meta.json +++ b/sdk/securityinsight/arm-securityinsight/_meta.json @@ -1,8 +1,8 @@ { - "commit": "b41f929626289b59e31be8a1091c99994864b096", + "commit": "2f09e9b983746a9f2edd59da7603c2b0c8d5dde0", "readme": "specification/securityinsights/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\securityinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220727.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.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.4", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/securityinsight/arm-securityinsight/package.json b/sdk/securityinsight/arm-securityinsight/package.json index 9a999cddda13..e7f19ecf5858 100644 --- a/sdk/securityinsight/arm-securityinsight/package.json +++ b/sdk/securityinsight/arm-securityinsight/package.json @@ -109,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 44b02eb0987b..f114c26c35bf 100644 --- a/sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md +++ b/sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md @@ -246,10 +246,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; @@ -684,6 +694,11 @@ export interface AzureDevOpsResourceInfo { serviceConnectionId?: string; } +// @public +export interface AzureEntityResource extends Resource { + readonly etag?: string; +} + // @public export interface AzureResourceEntity extends Entity { readonly additionalData?: { @@ -1768,6 +1783,26 @@ export type EntityUnion = Entity | SecurityAlert | HuntingBookmark | AccountEnti // @public export type Enum13 = string; +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export type EventGroupingAggregationKind = string; @@ -2694,6 +2729,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", @@ -3982,6 +4030,7 @@ export interface NrtAlertRule extends AlertRule { kind: "NRT"; readonly lastModifiedUtc?: Date; query?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; suppressionDuration?: string; suppressionEnabled?: boolean; @@ -4006,6 +4055,7 @@ export interface NrtAlertRuleTemplate extends AlertRuleTemplate { readonly lastUpdatedDateUTC?: Date; query?: string; requiredDataConnectors?: AlertRuleTemplateDataSource[]; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; status?: TemplateStatus; tactics?: AttackTactic[]; @@ -4380,6 +4430,7 @@ export interface QueryBasedAlertRuleTemplateProperties { entityMappings?: EntityMapping[]; eventGroupingSettings?: EventGroupingSettings; query?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; version?: string; } @@ -4528,6 +4579,7 @@ export interface ScheduledAlertRule extends AlertRule { query?: string; queryFrequency?: string; queryPeriod?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; suppressionDuration?: string; suppressionEnabled?: boolean; @@ -4549,6 +4601,7 @@ export interface ScheduledAlertRuleCommonProperties { query?: string; queryFrequency?: string; queryPeriod?: string; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; triggerOperator?: TriggerOperator; triggerThreshold?: number; @@ -4587,6 +4640,7 @@ export interface ScheduledAlertRuleTemplate extends AlertRuleTemplate { queryFrequency?: string; queryPeriod?: string; requiredDataConnectors?: AlertRuleTemplateDataSource[]; + sentinelEntitiesMappings?: SentinelEntityMapping[]; severity?: AlertSeverity; status?: TemplateStatus; tactics?: AttackTactic[]; @@ -4672,10 +4726,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; } @@ -4775,6 +4831,8 @@ export class SecurityInsights extends coreClient.ServiceClient { watchlistItems: WatchlistItems; // (undocumented) watchlists: Watchlists; + // (undocumented) + workspaceManagerGroups: WorkspaceManagerGroups; } // @public @@ -4847,6 +4905,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; @@ -5696,6 +5759,65 @@ export interface Webhook { webhookUrl?: string; } +// @public +export interface WorkspaceManagerGroup extends AzureEntityResource { + description?: string; + displayName?: string; + memberResourceNames?: string[]; +} + +// @public +export interface WorkspaceManagerGroupList { + readonly nextLink?: string; + value: WorkspaceManagerGroup[]; +} + +// @public +export interface WorkspaceManagerGroups { + createOrUpdate(resourceGroupName: string, workspaceName: string, workspaceManagerGroupName: string, workspaceManagerGroup: WorkspaceManagerGroup, options?: WorkspaceManagerGroupsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, workspaceName: string, workspaceManagerGroupName: string, options?: WorkspaceManagerGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, workspaceName: string, workspaceManagerGroupName: string, options?: WorkspaceManagerGroupsGetOptionalParams): Promise; + list(resourceGroupName: string, workspaceName: string, options?: WorkspaceManagerGroupsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface WorkspaceManagerGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspaceManagerGroupsCreateOrUpdateResponse = WorkspaceManagerGroup; + +// @public +export interface WorkspaceManagerGroupsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WorkspaceManagerGroupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WorkspaceManagerGroupsGetResponse = WorkspaceManagerGroup; + +// @public +export interface WorkspaceManagerGroupsListNextOptionalParams extends coreClient.OperationOptions { + orderby?: string; + skipToken?: string; + top?: number; +} + +// @public +export type WorkspaceManagerGroupsListNextResponse = WorkspaceManagerGroupList; + +// @public +export interface WorkspaceManagerGroupsListOptionalParams extends coreClient.OperationOptions { + orderby?: string; + skipToken?: string; + top?: number; +} + +// @public +export type WorkspaceManagerGroupsListResponse = WorkspaceManagerGroupList; + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/securityinsight/arm-securityinsight/src/models/index.ts b/sdk/securityinsight/arm-securityinsight/src/models/index.ts index 0ce7824a0d80..eef98e645e87 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/index.ts @@ -1329,6 +1329,66 @@ export interface WatchlistItemList { value: WatchlistItem[]; } +/** List of all the workspace manager groups. */ +export interface WorkspaceManagerGroupList { + /** + * URL to fetch the next set of workspace manager groups. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** Array of workspace manager groups. */ + value: WorkspaceManagerGroup[]; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** List all the data connectors. */ export interface DataConnectorList { /** @@ -1479,6 +1539,8 @@ export interface QueryBasedAlertRuleTemplateProperties { 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 */ @@ -1507,6 +1569,16 @@ 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. */ @@ -1515,6 +1587,12 @@ export interface EventGroupingSettings { 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. */ export interface FusionSourceSettings { /** Determines whether this source signal is enabled or disabled in Fusion detection. */ @@ -1656,6 +1734,8 @@ export interface ScheduledAlertRuleCommonProperties { entityMappings?: EntityMapping[]; /** The alert details override settings */ alertDetailsOverride?: AlertDetailsOverride; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } export interface AutomationRuleBooleanCondition { @@ -2302,6 +2382,15 @@ export interface OfficeConsent extends Resource { consentId?: string; } +/** The resource model definition for an Azure Resource Manager resource with an etag. */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; +} + /** Action property bag. */ export interface ActionResponseProperties extends ActionPropertiesBase { /** The name of the logic app's workflow. */ @@ -2459,6 +2548,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. */ @@ -4547,6 +4643,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. */ @@ -4591,6 +4689,8 @@ export interface NrtAlertRuleTemplate extends AlertRuleTemplate { 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. */ @@ -5813,6 +5913,16 @@ export interface ActivityEntityQueryTemplate extends EntityQueryTemplate { entitiesFilter?: { [propertyName: string]: string[] }; } +/** The workspace manager group */ +export interface WorkspaceManagerGroup extends AzureEntityResource { + /** The description of the workspace manager group */ + description?: string; + /** The display name of the workspace manager group */ + displayName?: string; + /** The names of the workspace manager members participating in this group. */ + memberResourceNames?: string[]; +} + /** MLBehaviorAnalytics alert rule template properties. */ export interface MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { @@ -6004,6 +6114,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> */ @@ -6072,6 +6184,8 @@ export interface NrtAlertRule extends AlertRule { alertDetailsOverride?: AlertDetailsOverride; /** The event grouping settings. */ eventGroupingSettings?: EventGroupingSettings; + /** Array of the sentinel entity mappings of the alert rule */ + sentinelEntitiesMappings?: SentinelEntityMapping[]; } /** Represents Expansion entity query. */ @@ -7897,6 +8011,45 @@ 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 */ @@ -9801,6 +9954,52 @@ export interface WatchlistItemsListNextOptionalParams /** Contains response data for the listNext operation. */ export type WatchlistItemsListNextResponse = WatchlistItemList; +/** Optional parameters. */ +export interface WorkspaceManagerGroupsListOptionalParams + extends coreClient.OperationOptions { + /** 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 WorkspaceManagerGroupsListResponse = WorkspaceManagerGroupList; + +/** Optional parameters. */ +export interface WorkspaceManagerGroupsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WorkspaceManagerGroupsGetResponse = WorkspaceManagerGroup; + +/** Optional parameters. */ +export interface WorkspaceManagerGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type WorkspaceManagerGroupsCreateOrUpdateResponse = WorkspaceManagerGroup; + +/** Optional parameters. */ +export interface WorkspaceManagerGroupsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceManagerGroupsListNextOptionalParams + extends coreClient.OperationOptions { + /** 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 WorkspaceManagerGroupsListNextResponse = WorkspaceManagerGroupList; + /** Optional parameters. */ export interface DataConnectorsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts b/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts index 6f5b1105eada..d7e511de9684 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/mappers.ts @@ -3432,6 +3432,131 @@ export const WatchlistItemList: coreClient.CompositeMapper = { } }; +export const WorkspaceManagerGroupList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspaceManagerGroupList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceManagerGroup" + } + } + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + export const DataConnectorList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3820,6 +3945,18 @@ export const QueryBasedAlertRuleTemplateProperties: coreClient.CompositeMapper = name: "Composite", className: "EventGroupingSettings" } + }, + sentinelEntitiesMappings: { + serializedName: "sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -3901,6 +4038,39 @@ 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" + } } } } @@ -3921,6 +4091,21 @@ export const EventGroupingSettings: coreClient.CompositeMapper = { } }; +export const SentinelEntityMapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SentinelEntityMapping", + modelProperties: { + columnName: { + serializedName: "columnName", + type: { + name: "String" + } + } + } + } +}; + export const FusionSourceSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4368,6 +4553,18 @@ export const ScheduledAlertRuleCommonProperties: coreClient.CompositeMapper = { name: "Composite", className: "AlertDetailsOverride" } + }, + sentinelEntitiesMappings: { + serializedName: "sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -6247,6 +6444,23 @@ export const OfficeConsent: coreClient.CompositeMapper = { } }; +export const AzureEntityResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ActionResponseProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6720,6 +6934,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" + } + } + } } } } @@ -11672,6 +11904,18 @@ export const ScheduledAlertRuleTemplate: coreClient.CompositeMapper = { name: "Composite", className: "AlertDetailsOverride" } + }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -11808,6 +12052,18 @@ export const NrtAlertRuleTemplate: coreClient.CompositeMapper = { name: "Composite", className: "EventGroupingSettings" } + }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } @@ -13947,6 +14203,39 @@ export const ActivityEntityQueryTemplate: coreClient.CompositeMapper = { } }; +export const WorkspaceManagerGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspaceManagerGroup", + modelProperties: { + ...AzureEntityResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + memberResourceNames: { + serializedName: "properties.memberResourceNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const MLBehaviorAnalyticsAlertRuleTemplateProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -14408,6 +14697,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: { @@ -14621,6 +14922,18 @@ export const NrtAlertRule: coreClient.CompositeMapper = { name: "Composite", className: "EventGroupingSettings" } + }, + sentinelEntitiesMappings: { + serializedName: "properties.sentinelEntitiesMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SentinelEntityMapping" + } + } + } } } } diff --git a/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts b/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts index dd3bcead9d0b..cb3167ccaeae 100644 --- a/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts +++ b/sdk/securityinsight/arm-securityinsight/src/models/parameters.ts @@ -38,6 +38,7 @@ import { ThreatIntelligenceAppendTags as ThreatIntelligenceAppendTagsMapper, Watchlist as WatchlistMapper, WatchlistItem as WatchlistItemMapper, + WorkspaceManagerGroup as WorkspaceManagerGroupMapper, DataConnector as DataConnectorMapper, DataConnectorConnectBody as DataConnectorConnectBodyMapper, DataConnectorsCheckRequirements as DataConnectorsCheckRequirementsMapper @@ -70,7 +71,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-09-01-preview", + defaultValue: "2023-03-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -640,6 +641,22 @@ export const watchlistItem: OperationParameter = { mapper: WatchlistItemMapper }; +export const workspaceManagerGroupName: OperationURLParameter = { + parameterPath: "workspaceManagerGroupName", + mapper: { + serializedName: "workspaceManagerGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const workspaceManagerGroup: OperationParameter = { + parameterPath: "workspaceManagerGroup", + mapper: WorkspaceManagerGroupMapper +}; + export const dataConnectorId: OperationURLParameter = { parameterPath: "dataConnectorId", mapper: { diff --git a/sdk/securityinsight/arm-securityinsight/src/operations/index.ts b/sdk/securityinsight/arm-securityinsight/src/operations/index.ts index 6f66d834535e..c2af15372fb6 100644 --- a/sdk/securityinsight/arm-securityinsight/src/operations/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/operations/index.ts @@ -37,6 +37,7 @@ export * from "./threatIntelligenceIndicators"; export * from "./threatIntelligenceIndicatorMetrics"; export * from "./watchlists"; export * from "./watchlistItems"; +export * from "./workspaceManagerGroups"; export * from "./dataConnectors"; export * from "./dataConnectorsCheckRequirementsOperations"; export * from "./operations"; diff --git a/sdk/securityinsight/arm-securityinsight/src/operations/workspaceManagerGroups.ts b/sdk/securityinsight/arm-securityinsight/src/operations/workspaceManagerGroups.ts new file mode 100644 index 000000000000..7c3a7633d511 --- /dev/null +++ b/sdk/securityinsight/arm-securityinsight/src/operations/workspaceManagerGroups.ts @@ -0,0 +1,330 @@ +/* + * 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 { WorkspaceManagerGroups } 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 { + WorkspaceManagerGroup, + WorkspaceManagerGroupsListNextOptionalParams, + WorkspaceManagerGroupsListOptionalParams, + WorkspaceManagerGroupsListResponse, + WorkspaceManagerGroupsGetOptionalParams, + WorkspaceManagerGroupsGetResponse, + WorkspaceManagerGroupsCreateOrUpdateOptionalParams, + WorkspaceManagerGroupsCreateOrUpdateResponse, + WorkspaceManagerGroupsDeleteOptionalParams, + WorkspaceManagerGroupsListNextResponse +} from "../models"; + +/// +/** Class containing WorkspaceManagerGroups operations. */ +export class WorkspaceManagerGroupsImpl implements WorkspaceManagerGroups { + private readonly client: SecurityInsights; + + /** + * Initialize a new instance of the class WorkspaceManagerGroups class. + * @param client Reference to the service client + */ + constructor(client: SecurityInsights) { + this.client = client; + } + + /** + * Gets all workspace manager groups in the Sentinel workspace manager + * @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?: WorkspaceManagerGroupsListOptionalParams + ): 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?: WorkspaceManagerGroupsListOptionalParams + ): 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?: WorkspaceManagerGroupsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + workspaceName, + options + )) { + yield* page; + } + } + + /** + * Gets all workspace manager groups in the Sentinel workspace manager + * @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?: WorkspaceManagerGroupsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, options }, + listOperationSpec + ); + } + + /** + * Gets a workspace manager group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerGroupName The name of the workspace manager group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + workspaceName: string, + workspaceManagerGroupName: string, + options?: WorkspaceManagerGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, workspaceManagerGroupName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates a workspace manager group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerGroupName The name of the workspace manager group + * @param workspaceManagerGroup The workspace manager group object + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + workspaceName: string, + workspaceManagerGroupName: string, + workspaceManagerGroup: WorkspaceManagerGroup, + options?: WorkspaceManagerGroupsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + workspaceManagerGroupName, + workspaceManagerGroup, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Deletes a workspace manager group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerGroupName The name of the workspace manager group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + workspaceName: string, + workspaceManagerGroupName: string, + options?: WorkspaceManagerGroupsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, workspaceManagerGroupName, options }, + deleteOperationSpec + ); + } + + /** + * 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?: WorkspaceManagerGroupsListNextOptionalParams + ): 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/workspaceManagerGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceManagerGroupList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + 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/workspaceManagerGroups/{workspaceManagerGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceManagerGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.workspaceManagerGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerGroups/{workspaceManagerGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceManagerGroup + }, + 201: { + bodyMapper: Mappers.WorkspaceManagerGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.workspaceManagerGroup, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.workspaceManagerGroupName + ], + 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/workspaceManagerGroups/{workspaceManagerGroupName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.workspaceManagerGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkspaceManagerGroupList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + 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/operationsInterfaces/index.ts b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts index 6f66d834535e..c2af15372fb6 100644 --- a/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts +++ b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts @@ -37,6 +37,7 @@ export * from "./threatIntelligenceIndicators"; export * from "./threatIntelligenceIndicatorMetrics"; export * from "./watchlists"; export * from "./watchlistItems"; +export * from "./workspaceManagerGroups"; export * from "./dataConnectors"; export * from "./dataConnectorsCheckRequirementsOperations"; export * from "./operations"; diff --git a/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/workspaceManagerGroups.ts b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/workspaceManagerGroups.ts new file mode 100644 index 000000000000..2e181ac7819a --- /dev/null +++ b/sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/workspaceManagerGroups.ts @@ -0,0 +1,75 @@ +/* + * 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 { + WorkspaceManagerGroup, + WorkspaceManagerGroupsListOptionalParams, + WorkspaceManagerGroupsGetOptionalParams, + WorkspaceManagerGroupsGetResponse, + WorkspaceManagerGroupsCreateOrUpdateOptionalParams, + WorkspaceManagerGroupsCreateOrUpdateResponse, + WorkspaceManagerGroupsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a WorkspaceManagerGroups. */ +export interface WorkspaceManagerGroups { + /** + * Gets all workspace manager groups in the Sentinel workspace manager + * @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?: WorkspaceManagerGroupsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a workspace manager group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerGroupName The name of the workspace manager group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + workspaceName: string, + workspaceManagerGroupName: string, + options?: WorkspaceManagerGroupsGetOptionalParams + ): Promise; + /** + * Creates or updates a workspace manager group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerGroupName The name of the workspace manager group + * @param workspaceManagerGroup The workspace manager group object + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + workspaceName: string, + workspaceManagerGroupName: string, + workspaceManagerGroup: WorkspaceManagerGroup, + options?: WorkspaceManagerGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a workspace manager group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerGroupName The name of the workspace manager group + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + workspaceName: string, + workspaceManagerGroupName: string, + options?: WorkspaceManagerGroupsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts b/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts index 240c03409f08..8c7a4a2e6df3 100644 --- a/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts +++ b/sdk/securityinsight/arm-securityinsight/src/securityInsights.ts @@ -46,6 +46,7 @@ import { ThreatIntelligenceIndicatorMetricsImpl, WatchlistsImpl, WatchlistItemsImpl, + WorkspaceManagerGroupsImpl, DataConnectorsImpl, DataConnectorsCheckRequirementsOperationsImpl, OperationsImpl @@ -82,6 +83,7 @@ import { ThreatIntelligenceIndicatorMetrics, Watchlists, WatchlistItems, + WorkspaceManagerGroups, DataConnectors, DataConnectorsCheckRequirementsOperations, Operations @@ -174,7 +176,7 @@ export class SecurityInsights extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-09-01-preview"; + this.apiVersion = options.apiVersion || "2023-03-01-preview"; this.alertRules = new AlertRulesImpl(this); this.actions = new ActionsImpl(this); this.alertRuleTemplates = new AlertRuleTemplatesImpl(this); @@ -214,6 +216,7 @@ export class SecurityInsights extends coreClient.ServiceClient { ); this.watchlists = new WatchlistsImpl(this); this.watchlistItems = new WatchlistItemsImpl(this); + this.workspaceManagerGroups = new WorkspaceManagerGroupsImpl(this); this.dataConnectors = new DataConnectorsImpl(this); this.dataConnectorsCheckRequirementsOperations = new DataConnectorsCheckRequirementsOperationsImpl( this @@ -281,6 +284,7 @@ export class SecurityInsights extends coreClient.ServiceClient { threatIntelligenceIndicatorMetrics: ThreatIntelligenceIndicatorMetrics; watchlists: Watchlists; watchlistItems: WatchlistItems; + workspaceManagerGroups: WorkspaceManagerGroups; dataConnectors: DataConnectors; dataConnectorsCheckRequirementsOperations: DataConnectorsCheckRequirementsOperations; operations: Operations; diff --git a/sdk/securityinsight/arm-securityinsight/test/sampleTest.ts b/sdk/securityinsight/arm-securityinsight/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/securityinsight/arm-securityinsight/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/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"