Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - SecurityInsights")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("3.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("3.2.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

114 changes: 35 additions & 79 deletions src/SecurityInsights/SecurityInsights.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,20 @@ input-file:
- $(repo)/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/ThreatIntelligence.json
#- $(repo)/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/Watchlists.json
- $(repo)/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/dataConnectors.json
- $(repo)/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/operations.json
# - $(repo)/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/operations.json

module-version: 1.2.0
title: SecurityInsights
subject-prefix: Sentinel

inlining-threshold: 50

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
# Fixes/overrides to swaggers
# Fix to x-ms-enum when integer (https://github.com/Azure/autorest.powershell/issues/856)
- from: dataConnectors.json
where: $.definitions.Availability.properties.status
transform: >-
return {
"description": "The connector Availability Status",
"format": "int32",
"type": "integer",
"enum": [
1
]
}
# Customize
# Hide Operation API
- where:
subject: Operation
hide: true
# - where:
# subject: Operation
# hide: true
# Hide OfficeConsent API
- where:
subject: OfficeConsent
Expand All @@ -109,8 +92,12 @@ directive:
# Change Sets to Updates to match current module
- where:
verb: Set
subject: AlertRuleAction
set:
verb: Update
- where:
verb: Set
remove: true
# fix subject name to encrichment
- where:
subject: DomainWhois
Expand Down Expand Up @@ -145,44 +132,15 @@ directive:
set:
verb: Get
subject: EntityActivity
# Fix Update ThreatIntelligenceIndicator
- select: command
where:
verb: New
subject: ThreatIntelligenceIndicator
variant: CreateExpanded1
set:
verb: Update
variant: UpdateExpanded
- select: command
where:
verb: New
subject: ThreatIntelligenceIndicator
variant: CreateViaIdentity1
set:
verb: Update
variant: UpdateViaIdentity
- select: command
where:
verb: New
subject: ThreatIntelligenceIndicator
variant: CreateViaIdentityExpanded1
set:
verb: Update
variant: UpdateViaIdentityExpanded
- where:
subject: ThreatIntelligenceIndicatorQuery
variant: QueryViaIdentityExpanded
remove: true
# Fix Entity Insights
- where:
subject: EntityInsight
variant: ^Get$|^GetViaIdentity$
variant: ^(Get|GetViaIdentity)(?!.*?Expanded)
remove: true
# Fix Entity TimeLime
- where:
subject: EntityTimeline
variant: List
variant: ^(List)(?!.*?Expanded)
remove: true
# Rename Id for user expierence
- where:
Expand Down Expand Up @@ -225,11 +183,6 @@ directive:
parameter-name: Id
set:
alias: IncidentCommentId
#Remove Enrichment
- where:
subject: ^Enrichment$
variant: ^GetViaIdenity$|^GetViaIdenity1$
remove: true
# Remove source control (requires OAUTH tokens)
- where:
subject: SourceControl
Expand All @@ -240,31 +193,41 @@ directive:
subject: DataConnectorsCheckRequirement
hide: true
- where:
verb: New
subject: ^AlertRule$|^DataConnector$|^EntityQuery$
variant: Create
hide: true
- where:
verb: Update
subject: ^AlertRule$|^DataConnector$|^EntityQuery$
variant: ^Create$|^CreateExpanded$|^Update$|^UpdateExpanded$|^UpdateViaIdentity$|^UpdateViaIdentityExpanded$
variant: Update
hide: true
- where:
subject: ^AlertRule$|^DataConnector$|^EntityQuery$
variant: ^(Create|Update)(?=.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentity$|^CreateViaIdentityWorkspace$|^UpdateViaIdentity$
remove: true
- where:
verb: ^Update$|^Remove$
subject: Setting
hide: true
# Hide Etag as it isnt used
# Hide Etag as it isn't used
- where:
parameter-name: Etag
hide: true
# TI API not useful until API changes
- where:
verb: ^Add$|^New$|^Update$|^Remove$
subject: ThreatIntelligenceIndicator
hide: true
remove: true
- where:
verb: ^Add$|^New$|^Update$|^Remove$
subject: ThreatIntelligenceIndicatorTag
hide: true
remove: true
# CCP
- where:
verb: ^Connect$|^Disconnect$
subject: DataConnector
hide: true
remove: true
# cmdlet review feedback
- where:
subject: Bookmark
Expand Down Expand Up @@ -296,11 +259,6 @@ directive:
parameter-name: DataConnectorsCheckRequirement
set:
parameter-name: DataConnectorCheckRequirement
- where:
verb: New
subject: AlertRuleAction
variant: Create
hide: true
- where:
verb: New
subject: ^AlertRuleAction$|^AutomationRule$|^Bookmark$|^Incident$|^IncidentComment$|
Expand All @@ -319,28 +277,26 @@ directive:
- where:
verb: Expand
subject: ^Bookmark$|^Entity$
hide: true
remove: true
- where:
verb: ^New$|^Update$|^Remove$
subject: Metadata
hide: true
remove: true
# Hide Source Control
- where:
verb: Get
subject: SourceControlRepository
hide: true
# Hide UpdateViaId and Update
- where:
variant: ^Update$|^UpdateViaIdentity$
hide: true
# Remove the unexpanded parameter set
- where:
variant: ^Append$|^AppendViaIdentity$|^Connect$|^ConnectViaIdentity$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Expand$|^ExpandViaIdentity$|^ExpandViaIdentityExpanded$|^GetViaIdentityExpanded$|^PostViaIdentity$|^Query$|^QueryViaIdentity$|^QueriesViaIdentity$|^Replace$|^ReplaceViaIdentity$
subject: AlertRuleAction|AutomationRule|Bookmark|Incident|SentinelOnboardingState
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
remove: true
# fix Equals that conflicts with inhertied property
- where:
enum-name: AutomationRulePropertyConditionSupportedOperator
enum-value-name: Equals
set:
enum-value-name: Equal
variant: ^(Append|Connect|Expand|Query|Replace)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
# Remove module-cross object (unknown)
- where:
variant: ^(Create|Update|Query|Queries|Replace|Get|Delete)(?=.*?Workspace)
remove: true
```
Loading
Loading