Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0ca96c3
convert
XiaofeiCao Sep 2, 2025
fde50f1
adapt virtual resource
XiaofeiCao Sep 2, 2025
ac5ac1e
fix path diff
XiaofeiCao Sep 2, 2025
9c14c32
use virtual resource
XiaofeiCao Sep 3, 2025
37ec1b5
fix rest of the path diffs
XiaofeiCao Sep 3, 2025
9802ae8
mitigate KeyName difference
XiaofeiCao Sep 3, 2025
649a697
java SDK compilation fix
XiaofeiCao Sep 5, 2025
e0d6f67
fix route
XiaofeiCao Sep 5, 2025
3229298
fix ThreatIndicatorInformation
XiaofeiCao Sep 5, 2025
2d057ce
fix more diffs
XiaofeiCao Sep 5, 2025
7a0ef4a
fix flattenProperty
XiaofeiCao Sep 29, 2025
c00438c
use DiscriminatedExtensionResource
XiaofeiCao Sep 29, 2025
0224a90
java renames
XiaofeiCao Oct 9, 2025
b8dcbc3
fix etag
XiaofeiCao Oct 9, 2025
9d6b900
remove OperationId
XiaofeiCao Oct 13, 2025
bc0eb6c
fix ActionRequest
XiaofeiCao Oct 13, 2025
2787987
more discrepancy fix
XiaofeiCao Oct 13, 2025
b821e3e
more java configs
XiaofeiCao Oct 13, 2025
14bd944
prettier
XiaofeiCao Oct 14, 2025
d0fdce7
fix tsp validation ci
XiaofeiCao Oct 14, 2025
e877672
fix cspell
XiaofeiCao Oct 14, 2025
4313fec
add suppressions
XiaofeiCao Oct 14, 2025
eb3e3d5
more suppressions
XiaofeiCao Oct 14, 2025
7fe959d
fix ExtensionResource optional request body
XiaofeiCao Oct 15, 2025
f5e706f
language configs
XiaofeiCao Oct 15, 2025
cbe2bec
regen swagger
XiaofeiCao Oct 15, 2025
40e3d1a
Merge branch 'main' into migrate/securityinsights
v-jiaodi Nov 19, 2025
38540ae
Merge branch 'main' into migrate/securityinsights
v-jiaodi Dec 1, 2025
244ab83
Merge branch 'main' into migrate/securityinsights
v-jiaodi Dec 12, 2025
a27bc20
Resolve conflicts and refactor folder V2
v-xuto Jan 9, 2026
e5277fc
Update path in cspell.yaml
v-xuto Jan 9, 2026
bc06cfb
Merge remote-tracking branch 'upstream/main' into migrate/securityins…
melina5656 Jan 12, 2026
af68589
Fix diff and errors
melina5656 Jan 22, 2026
47368a3
suppress warning
melina5656 Jan 22, 2026
ee28a90
remove old swagger files
melina5656 Jan 22, 2026
431558e
fix swagger model validation errors
melina5656 Jan 22, 2026
1be5ef6
Enable compatibility-lro in tspconfig.yaml
v-jiaodi Jan 22, 2026
7bfdfa8
Remove compatibility-lro from tspconfig.yaml
v-jiaodi Feb 2, 2026
b834ae6
update justification
melina5656 Feb 9, 2026
06a76ef
update tags
melina5656 Feb 10, 2026
3c69f70
update tags
melina5656 Feb 10, 2026
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
7 changes: 7 additions & 0 deletions specification/securityinsights/cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ overrides:
words:
- criterias
- mdti
- informations
- filename: >-
**/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/SecurityInsights/*.tsp
words:
- criterias
- mdti
- informations
- filename: >-
**/specification/securityinsights/data-plane/ThreatIntelligence/**/*.json
words:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./AlertRule.tsp";

using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.ResourceManager;

namespace Microsoft.SecurityInsights;
/**
* Action for alert rule.
*/
@parentResource(AlertRule)
model ActionResponse
is Azure.ResourceManager.ProxyResource<ActionResponseProperties> {
...ResourceNameParameter<
Resource = ActionResponse,
KeyName = "actionId",
SegmentName = "actions",
NamePattern = ""
>;

/**
* Etag of the action.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
etag?: string;
}

@armResourceOperations(#{ omitTags: true })
interface ActionResponses {
/**
* Gets the action of alert rule.
*/
@tag("Actions")
get is Extension.Read<
OperationalInsights,
ActionResponse,
Error = CloudError
>;

/**
* Creates or updates the action of alert rule.
*/
// Customized resource creation, since request body isn't the resource itself
@autoRoute
@put
@tag("Actions")
createOrUpdate is Azure.ResourceManager.Foundations.ArmCreateOperation<
Azure.ResourceManager.Extension.ExtensionInstanceParameters<
OperationalInsights,
ActionResponse
>,
ActionRequest,
ArmResourceUpdatedResponse<ActionResponse> | ArmResourceCreatedResponse<ActionResponse>,
ErrorResponse = CloudError
>;

/**
* Delete the action of alert rule.
*/
@tag("Actions")
delete is Extension.DeleteSync<
OperationalInsights,
ActionResponse,
Error = CloudError
>;

/**
* Gets all actions of alert rule.
*/
@tag("Actions")
listByAlertRule is Extension.ListByTarget<
OperationalInsights,
ActionResponse,
Response = ArmResponse<ActionsList>,
Error = CloudError
>;
}

@@doc(ActionResponse.name, "Action ID");
@@doc(ActionResponse.properties, "Action properties for get request");
@@doc(ActionResponses.createOrUpdate::parameters.resource, "The action");
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./VirtualResource.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.SecurityInsights;

/**
* Alert rule.
*/
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@discriminator("kind")
model AlertRule
is Azure.ResourceManager.Legacy.DiscriminatedExtensionResource<AlertRuleKind> {
...ResourceNameParameter<
Resource = AlertRule,
KeyName = "ruleId",
SegmentName = "alertRules",
NamePattern = ""
>;

/**
* Etag of the azure resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
etag?: string;
}

@armResourceOperations(#{ omitTags: true })
interface AlertRules {
/**
* Gets the alert rule.
*/
@tag("Alert Rules")
get is Extension.Read<OperationalInsights, AlertRule, Error = CloudError>;

/**
* Creates or updates the alert rule.
*/
@tag("Alert Rules")
createOrUpdate is Extension.CreateOrReplaceSync<
OperationalInsights,
AlertRule,
Error = CloudError
>;

/**
* Delete the alert rule.
*/
@tag("Alert Rules")
delete is Extension.DeleteSync<
OperationalInsights,
AlertRule,
Error = CloudError
>;

/**
* Gets all alert rules.
*/
@tag("Alert Rules")
list is Extension.ListByTarget<
OperationalInsights,
AlertRule,
Response = ArmResponse<AlertRulesList>,
Error = CloudError
>;
}

@@doc(AlertRule.name, "Alert rule ID");
@@doc(AlertRules.createOrUpdate::parameters.resource, "The alert rule");
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./VirtualResource.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.SecurityInsights;
/**
* Alert rule template.
*/
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
model AlertRuleTemplate
is Azure.ResourceManager.Legacy.DiscriminatedExtensionResource<AlertRuleKind> {
...ResourceNameParameter<
Resource = AlertRuleTemplate,
KeyName = "alertRuleTemplateId",
SegmentName = "alertRuleTemplates",
NamePattern = ""
>;
}

@armResourceOperations(#{ omitTags: true })
interface AlertRuleTemplates {
/**
* Gets the alert rule template.
*/
@tag("Alert Rule Templates")
get is Extension.Read<
OperationalInsights,
AlertRuleTemplate,
Error = CloudError
>;

/**
* Gets all alert rule templates.
*/
@tag("Alert Rule Templates")
list is Extension.ListByTarget<
OperationalInsights,
AlertRuleTemplate,
Response = ArmResponse<AlertRuleTemplatesList>,
Error = CloudError
>;
}

@@doc(AlertRuleTemplate.name, "Alert rule template ID");
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./VirtualResource.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.SecurityInsights;

model AutomationRule
is Azure.ResourceManager.ProxyResource<AutomationRuleProperties, false> {
...ResourceNameParameter<
Resource = AutomationRule,
KeyName = "automationRuleId",
SegmentName = "automationRules",
NamePattern = ""
>;

/**
* Etag of the azure resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
etag?: string;
}

// Added manually only to fix optional request body
alias AutomationRuleOps = Azure.ResourceManager.Legacy.ExtensionOperations<
{
...ApiVersionParameter;
...SubscriptionIdParameter;
...ResourceGroupParameter;

/** the provider namespace */
@path
@segment("providers")
@key
providerNamespace: "Microsoft.OperationalInsights";

/**
* The name of the workspace.
*/
@segment("workspaces")
@key
@path
@minLength(1)
@maxLength(90)
@pattern("^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$")
workspaceName: string;
},
{
...Extension.ExtensionProviderNamespace<AutomationRule>;
},
{
...Extension.ExtensionProviderNamespace<AutomationRule>;

/**
* The automation rule ID.
*/
@path
@key
@segment("automationRules")
automationRuleId: string;
}
>;

@armResourceOperations(#{ omitTags: true })
interface AutomationRules {
/**
* Gets the automation rule.
*/
@tag("automationRules")
get is Extension.Read<
OperationalInsights,
AutomationRule,
Error = CloudError
>;

/**
* Creates or updates the automation rule.
*/
@tag("automationRules")
createOrUpdate is AutomationRuleOps.CreateOrUpdateSync<
AutomationRule,
OptionalRequestBody = true,
ErrorType = CloudError
>;

/**
* Delete the automation rule.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-core/response-schema-problem" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@tag("automationRules")
delete is Extension.DeleteSync<
OperationalInsights,
AutomationRule,
Response = ArmResponse<{}> | (NoContentResponse & {
@body body: {};
}),
Error = CloudError
>;

/**
* Gets all automation rules.
*/
@tag("automationRules")
list is Extension.ListByTarget<
OperationalInsights,
AutomationRule,
Response = ArmResponse<AutomationRulesList>,
Error = CloudError
>;
}

@@doc(AutomationRule.name, "Automation rule ID");
@@doc(AutomationRule.properties, "Automation rule properties");
@@doc(AutomationRules.createOrUpdate::parameters.resource,
"The automation rule"
);
Loading
Loading