diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md
index 51d1f53d44663..2e9757ccfb0b5 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.5 (Unreleased)
+## 1.0.0-beta.1 (2023-01-19)
+
+- Azure Resource Manager SecurityInsights client library for Java. This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-2023-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md
index be7cd5eb6b9ee..bbead06fbc51b 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager SecurityInsights client library for Java.
-This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-2023-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-securityinsights
- 1.0.0-beta.4
+ 1.0.0-beta.5
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md
index de287165b2a01..3843e3cf898ca 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md
@@ -27,17 +27,6 @@
- [Get](#automationrules_get)
- [List](#automationrules_list)
-## BookmarkOperation
-
-- [Expand](#bookmarkoperation_expand)
-
-## BookmarkRelations
-
-- [CreateOrUpdate](#bookmarkrelations_createorupdate)
-- [Delete](#bookmarkrelations_delete)
-- [Get](#bookmarkrelations_get)
-- [List](#bookmarkrelations_list)
-
## Bookmarks
- [CreateOrUpdate](#bookmarks_createorupdate)
@@ -47,60 +36,11 @@
## DataConnectors
-- [Connect](#dataconnectors_connect)
- [CreateOrUpdate](#dataconnectors_createorupdate)
- [Delete](#dataconnectors_delete)
-- [Disconnect](#dataconnectors_disconnect)
- [Get](#dataconnectors_get)
- [List](#dataconnectors_list)
-## DataConnectorsCheckRequirementsOperation
-
-- [Post](#dataconnectorscheckrequirementsoperation_post)
-
-## DomainWhois
-
-- [Get](#domainwhois_get)
-
-## Entities
-
-- [Expand](#entities_expand)
-- [Get](#entities_get)
-- [GetInsights](#entities_getinsights)
-- [List](#entities_list)
-- [Queries](#entities_queries)
-
-## EntitiesGetTimeline
-
-- [List](#entitiesgettimeline_list)
-
-## EntitiesRelations
-
-- [List](#entitiesrelations_list)
-
-## EntityQueries
-
-- [CreateOrUpdate](#entityqueries_createorupdate)
-- [Delete](#entityqueries_delete)
-- [Get](#entityqueries_get)
-- [List](#entityqueries_list)
-
-## EntityQueryTemplates
-
-- [Get](#entityquerytemplates_get)
-- [List](#entityquerytemplates_list)
-
-## EntityRelations
-
-- [GetRelation](#entityrelations_getrelation)
-
-## FileImports
-
-- [Create](#fileimports_create)
-- [Delete](#fileimports_delete)
-- [Get](#fileimports_get)
-- [List](#fileimports_list)
-
## IncidentComments
- [CreateOrUpdate](#incidentcomments_createorupdate)
@@ -118,18 +58,12 @@
## Incidents
- [CreateOrUpdate](#incidents_createorupdate)
-- [CreateTeam](#incidents_createteam)
- [Delete](#incidents_delete)
- [Get](#incidents_get)
- [List](#incidents_list)
- [ListAlerts](#incidents_listalerts)
- [ListBookmarks](#incidents_listbookmarks)
- [ListEntities](#incidents_listentities)
-- [RunPlaybook](#incidents_runplaybook)
-
-## IpGeodata
-
-- [Get](#ipgeodata_get)
## Metadata
@@ -139,23 +73,10 @@
- [List](#metadata_list)
- [Update](#metadata_update)
-## OfficeConsents
-
-- [Delete](#officeconsents_delete)
-- [Get](#officeconsents_get)
-- [List](#officeconsents_list)
-
## Operations
- [List](#operations_list)
-## ProductSettings
-
-- [Delete](#productsettings_delete)
-- [Get](#productsettings_get)
-- [List](#productsettings_list)
-- [Update](#productsettings_update)
-
## SecurityMLAnalyticsSettings
- [CreateOrUpdate](#securitymlanalyticssettings_createorupdate)
@@ -170,17 +91,6 @@
- [Get](#sentinelonboardingstates_get)
- [List](#sentinelonboardingstates_list)
-## SourceControl
-
-- [ListRepositories](#sourcecontrol_listrepositories)
-
-## SourceControlsOperation
-
-- [Create](#sourcecontrolsoperation_create)
-- [Delete](#sourcecontrolsoperation_delete)
-- [Get](#sourcecontrolsoperation_get)
-- [List](#sourcecontrolsoperation_list)
-
## ThreatIntelligenceIndicator
- [AppendTags](#threatintelligenceindicator_appendtags)
@@ -218,7 +128,7 @@
/** Samples for Actions CreateOrUpdate. */
public final class ActionsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/CreateActionOfAlertRule.json
*/
/**
* Sample code: Creates or updates an action of alert rule.
@@ -244,12 +154,10 @@ public final class ActionsCreateOrUpdateSamples {
### Actions_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for Actions Delete. */
public final class ActionsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/DeleteActionOfAlertRule.json
*/
/**
* Sample code: Delete an action of alert rule.
@@ -265,7 +173,7 @@ public final class ActionsDeleteSamples {
"myWorkspace",
"73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"912bec42-cb66-4c03-ac63-1761b6898c3e",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -273,12 +181,10 @@ public final class ActionsDeleteSamples {
### Actions_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Actions Get. */
public final class ActionsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/GetActionOfAlertRuleById.json
*/
/**
* Sample code: Get an action of alert rule.
@@ -294,7 +200,7 @@ public final class ActionsGetSamples {
"myWorkspace",
"73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"912bec42-cb66-4c03-ac63-1761b6898c3e",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -302,12 +208,10 @@ public final class ActionsGetSamples {
### Actions_ListByAlertRule
```java
-import com.azure.core.util.Context;
-
/** Samples for Actions ListByAlertRule. */
public final class ActionsListByAlertRuleSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/GetAllActionsByAlertRule.json
*/
/**
* Sample code: Get all actions of alert rule.
@@ -316,7 +220,10 @@ public final class ActionsListByAlertRuleSamples {
*/
public static void getAllActionsOfAlertRule(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ manager
+ .actions()
+ .listByAlertRule(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -324,12 +231,10 @@ public final class ActionsListByAlertRuleSamples {
### AlertRuleTemplates_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for AlertRuleTemplates Get. */
public final class AlertRuleTemplatesGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRuleTemplates/GetAlertRuleTemplateById.json
*/
/**
* Sample code: Get alert rule template by Id.
@@ -340,7 +245,8 @@ public final class AlertRuleTemplatesGetSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.alertRuleTemplates()
- .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE);
+ .getWithResponse(
+ "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE);
}
}
```
@@ -348,12 +254,10 @@ public final class AlertRuleTemplatesGetSamples {
### AlertRuleTemplates_List
```java
-import com.azure.core.util.Context;
-
/** Samples for AlertRuleTemplates List. */
public final class AlertRuleTemplatesListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRuleTemplates/GetAlertRuleTemplates.json
*/
/**
* Sample code: Get all alert rule templates.
@@ -362,7 +266,7 @@ public final class AlertRuleTemplatesListSamples {
*/
public static void getAllAlertRuleTemplates(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE);
+ manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -370,7 +274,6 @@ public final class AlertRuleTemplatesListSamples {
### AlertRules_CreateOrUpdate
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.AlertDetail;
import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride;
import com.azure.resourcemanager.securityinsights.models.AlertSeverity;
@@ -381,16 +284,11 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingAggregatio
import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings;
import com.azure.resourcemanager.securityinsights.models.FieldMapping;
import com.azure.resourcemanager.securityinsights.models.FusionAlertRule;
-import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings;
-import com.azure.resourcemanager.securityinsights.models.FusionSourceSubTypeSetting;
-import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFilter;
-import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFiltersItem;
import com.azure.resourcemanager.securityinsights.models.GroupingConfiguration;
import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration;
import com.azure.resourcemanager.securityinsights.models.MatchingMethod;
import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule;
import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName;
-import com.azure.resourcemanager.securityinsights.models.NrtAlertRule;
import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule;
import com.azure.resourcemanager.securityinsights.models.TriggerOperator;
import java.time.Duration;
@@ -401,7 +299,7 @@ import java.util.Map;
/** Samples for AlertRules CreateOrUpdate. */
public final class AlertRulesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateFusionAlertRule.json
*/
/**
* Sample code: Creates or updates a Fusion alert rule.
@@ -419,212 +317,12 @@ public final class AlertRulesCreateOrUpdateSamples {
new FusionAlertRule()
.withEtag("3d00c3ca-0000-0100-0000-5d42d5010000")
.withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8")
- .withEnabled(true)
- .withSourceSettings(
- Arrays
- .asList(
- new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"),
- new FusionSourceSettings()
- .withEnabled(true)
- .withSourceName("Alert providers")
- .withSourceSubTypes(
- Arrays
- .asList(
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Active Directory Identity Protection")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Defender")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Defender for IoT")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft 365 Defender")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Cloud App Security")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Defender for Endpoint")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Defender for Identity")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Defender for Office 365")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Sentinel scheduled analytics rules")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))))),
- new FusionSourceSettings()
- .withEnabled(true)
- .withSourceName("Raw logs from other sources")
- .withSourceSubTypes(
- Arrays
- .asList(
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Palo Alto Networks")
- .withSeverityFilters(new FusionSubTypeSeverityFilter()))))),
- Context.NONE);
+ .withEnabled(true),
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json
*/
/**
* Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule.
@@ -644,11 +342,11 @@ public final class AlertRulesCreateOrUpdateSamples {
.withDisplayName("testing displayname")
.withEnabled(true)
.withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateScheduledAlertRule.json
*/
/**
* Sample code: Creates or updates a Scheduled alert rule.
@@ -671,7 +369,6 @@ public final class AlertRulesCreateOrUpdateSamples {
.withSuppressionDuration(Duration.parse("PT1H"))
.withSuppressionEnabled(false)
.withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT))
- .withTechniques(Arrays.asList("T1037", "T1021"))
.withIncidentConfiguration(
new IncidentConfiguration()
.withCreateIncident(true)
@@ -717,275 +414,7 @@ public final class AlertRulesCreateOrUpdateSamples {
new AlertDetailsOverride()
.withAlertDisplayNameFormat("Alert from {{Computer}}")
.withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json
- */
- /**
- * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .alertRules()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "myFirstFusionRule",
- new FusionAlertRule()
- .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000")
- .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8")
- .withEnabled(true)
- .withSourceSettings(
- Arrays
- .asList(
- new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"),
- new FusionSourceSettings()
- .withEnabled(true)
- .withSourceName("Alert providers")
- .withSourceSubTypes(
- Arrays
- .asList(
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Active Directory Identity Protection")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Defender")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Defender for IoT")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft 365 Defender")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Cloud App Security")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Defender for Endpoint")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Defender for Identity")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Microsoft Defender for Office 365")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))),
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Azure Sentinel scheduled analytics rules")
- .withSeverityFilters(
- new FusionSubTypeSeverityFilter()
- .withFilters(
- Arrays
- .asList(
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.HIGH)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.MEDIUM)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.LOW)
- .withEnabled(true),
- new FusionSubTypeSeverityFiltersItem()
- .withSeverity(AlertSeverity.INFORMATIONAL)
- .withEnabled(true)))))),
- new FusionSourceSettings()
- .withEnabled(true)
- .withSourceName("Raw logs from other sources")
- .withSourceSubTypes(
- Arrays
- .asList(
- new FusionSourceSubTypeSetting()
- .withEnabled(true)
- .withSourceSubTypeName("Palo Alto Networks")
- .withSeverityFilters(new FusionSubTypeSeverityFilter()))))),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json
- */
- /**
- * Sample code: Creates or updates a Nrt alert rule.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesANrtAlertRule(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .alertRules()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
- new NrtAlertRule()
- .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withDescription("")
- .withQuery(
- "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity ="
- + " ComputerIP_Hidden")
- .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT))
- .withTechniques(Arrays.asList("T1037", "T1021"))
- .withDisplayName("Rule2")
- .withEnabled(true)
- .withSuppressionDuration(Duration.parse("PT1H"))
- .withSuppressionEnabled(false)
- .withSeverity(AlertSeverity.HIGH)
- .withIncidentConfiguration(
- new IncidentConfiguration()
- .withCreateIncident(true)
- .withGroupingConfiguration(
- new GroupingConfiguration()
- .withEnabled(true)
- .withReopenClosedIncident(false)
- .withLookbackDuration(Duration.parse("PT5H"))
- .withMatchingMethod(MatchingMethod.SELECTED)
- .withGroupByEntities(
- Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT))))
- .withEventGroupingSettings(
- new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
@@ -1004,12 +433,10 @@ public final class AlertRulesCreateOrUpdateSamples {
### AlertRules_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for AlertRules Delete. */
public final class AlertRulesDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/DeleteAlertRule.json
*/
/**
* Sample code: Delete an alert rule.
@@ -1019,7 +446,8 @@ public final class AlertRulesDeleteSamples {
public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.alertRules()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -1027,12 +455,10 @@ public final class AlertRulesDeleteSamples {
### AlertRules_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for AlertRules Get. */
public final class AlertRulesGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetScheduledAlertRule.json
*/
/**
* Sample code: Get a Scheduled alert rule.
@@ -1043,25 +469,12 @@ public final class AlertRulesGetSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.alertRules()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json
- */
- /**
- * Sample code: Get an Nrt alert rule.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .alertRules()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .getWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetFusionAlertRule.json
*/
/**
* Sample code: Get a Fusion alert rule.
@@ -1069,11 +482,13 @@ public final class AlertRulesGetSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE);
+ manager
+ .alertRules()
+ .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json
*/
/**
* Sample code: Get a MicrosoftSecurityIncidentCreation rule.
@@ -1084,7 +499,11 @@ public final class AlertRulesGetSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.alertRules()
- .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE);
+ .getWithResponse(
+ "myRg",
+ "myWorkspace",
+ "microsoftSecurityIncidentCreationRuleExample",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1092,12 +511,10 @@ public final class AlertRulesGetSamples {
### AlertRules_List
```java
-import com.azure.core.util.Context;
-
/** Samples for AlertRules List. */
public final class AlertRulesListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetAllAlertRules.json
*/
/**
* Sample code: Get all alert rules.
@@ -1105,7 +522,7 @@ public final class AlertRulesListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.alertRules().list("myRg", "myWorkspace", Context.NONE);
+ manager.alertRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -1120,7 +537,7 @@ import java.util.List;
/** Samples for AutomationRules CreateOrUpdate. */
public final class AutomationRulesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_CreateOrUpdate.json
*/
/**
* Sample code: AutomationRules_CreateOrUpdate.
@@ -1145,12 +562,10 @@ public final class AutomationRulesCreateOrUpdateSamples {
### AutomationRules_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for AutomationRules Delete. */
public final class AutomationRulesDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_Delete.json
*/
/**
* Sample code: AutomationRules_Delete.
@@ -1161,7 +576,8 @@ public final class AutomationRulesDeleteSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.automationRules()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -1169,12 +585,10 @@ public final class AutomationRulesDeleteSamples {
### AutomationRules_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for AutomationRules Get. */
public final class AutomationRulesGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_Get.json
*/
/**
* Sample code: AutomationRules_Get.
@@ -1184,7 +598,8 @@ public final class AutomationRulesGetSamples {
public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.automationRules()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .getWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -1192,12 +607,10 @@ public final class AutomationRulesGetSamples {
### AutomationRules_List
```java
-import com.azure.core.util.Context;
-
/** Samples for AutomationRules List. */
public final class AutomationRulesListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_List.json
*/
/**
* Sample code: AutomationRules_List.
@@ -1205,149 +618,7 @@ public final class AutomationRulesListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.automationRules().list("myRg", "myWorkspace", Context.NONE);
- }
-}
-```
-
-### BookmarkOperation_Expand
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters;
-import java.time.OffsetDateTime;
-import java.util.UUID;
-
-/** Samples for BookmarkOperation Expand. */
-public final class BookmarkOperationExpandSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json
- */
- /**
- * Sample code: Expand an bookmark.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void expandAnBookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .bookmarkOperations()
- .expandWithResponse(
- "myRg",
- "myWorkspace",
- "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
- new BookmarkExpandParameters()
- .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z"))
- .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49"))
- .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")),
- Context.NONE);
- }
-}
-```
-
-### BookmarkRelations_CreateOrUpdate
-
-```java
-/** Samples for BookmarkRelations CreateOrUpdate. */
-public final class BookmarkRelationsCreateOrUpdateSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json
- */
- /**
- * Sample code: Creates or updates a bookmark relation.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesABookmarkRelation(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .bookmarkRelations()
- .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014")
- .withExistingBookmark("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096")
- .withRelatedResourceId(
- "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/incidents/afbd324f-6c48-459c-8710-8d1e1cd03812")
- .create();
- }
-}
-```
-
-### BookmarkRelations_Delete
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for BookmarkRelations Delete. */
-public final class BookmarkRelationsDeleteSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json
- */
- /**
- * Sample code: Delete the bookmark relation.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteTheBookmarkRelation(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .bookmarkRelations()
- .deleteWithResponse(
- "myRg",
- "myWorkspace",
- "2216d0e1-91e3-4902-89fd-d2df8c535096",
- "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
- }
-}
-```
-
-### BookmarkRelations_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for BookmarkRelations Get. */
-public final class BookmarkRelationsGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json
- */
- /**
- * Sample code: Get a bookmark relation.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getABookmarkRelation(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .bookmarkRelations()
- .getWithResponse(
- "myRg",
- "myWorkspace",
- "2216d0e1-91e3-4902-89fd-d2df8c535096",
- "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
- }
-}
-```
-
-### BookmarkRelations_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for BookmarkRelations List. */
-public final class BookmarkRelationsListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json
- */
- /**
- * Sample code: Get all bookmark relations.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllBookmarkRelations(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .bookmarkRelations()
- .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE);
+ manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -1355,9 +626,6 @@ public final class BookmarkRelationsListSamples {
### Bookmarks_CreateOrUpdate
```java
-import com.azure.resourcemanager.securityinsights.models.AttackTactic;
-import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings;
-import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping;
import com.azure.resourcemanager.securityinsights.models.UserInfo;
import java.time.OffsetDateTime;
import java.util.Arrays;
@@ -1366,7 +634,7 @@ import java.util.UUID;
/** Samples for Bookmarks CreateOrUpdate. */
public final class BookmarksCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/CreateBookmark.json
*/
/**
* Sample code: Creates or updates a bookmark.
@@ -1380,28 +648,15 @@ public final class BookmarksCreateOrUpdateSamples {
.define("73e01a99-5cd7-4139-a149-9f2736ff2ab5")
.withExistingWorkspace("myRg", "myWorkspace")
.withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withCreated(OffsetDateTime.parse("2021-09-01T13:15:30Z"))
+ .withCreated(OffsetDateTime.parse("2019-01-01T13:15:30Z"))
.withCreatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70")))
.withDisplayName("My bookmark")
.withLabels(Arrays.asList("Tag1", "Tag2"))
.withNotes("Found a suspicious activity")
.withQuery("SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)")
.withQueryResult("Security Event query result")
- .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z"))
+ .withUpdated(OffsetDateTime.parse("2019-01-01T13:15:30Z"))
.withUpdatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70")))
- .withEntityMappings(
- Arrays
- .asList(
- new BookmarkEntityMappings()
- .withEntityType("Account")
- .withFieldMappings(
- Arrays
- .asList(
- new EntityFieldMapping()
- .withIdentifier("Fullname")
- .withValue("johndoe@microsoft.com")))))
- .withTactics(Arrays.asList(AttackTactic.EXECUTION))
- .withTechniques(Arrays.asList("T1609"))
.create();
}
}
@@ -1410,12 +665,10 @@ public final class BookmarksCreateOrUpdateSamples {
### Bookmarks_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for Bookmarks Delete. */
public final class BookmarksDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/DeleteBookmark.json
*/
/**
* Sample code: Delete a bookmark.
@@ -1425,7 +678,8 @@ public final class BookmarksDeleteSamples {
public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.bookmarks()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -1433,12 +687,10 @@ public final class BookmarksDeleteSamples {
### Bookmarks_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Bookmarks Get. */
public final class BookmarksGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/GetBookmarkById.json
*/
/**
* Sample code: Get a bookmark.
@@ -1448,7 +700,8 @@ public final class BookmarksGetSamples {
public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.bookmarks()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .getWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -1456,12 +709,10 @@ public final class BookmarksGetSamples {
### Bookmarks_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Bookmarks List. */
public final class BookmarksListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/GetBookmarks.json
*/
/**
* Sample code: Get all bookmarks.
@@ -1469,2302 +720,255 @@ public final class BookmarksListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.bookmarks().list("myRg", "myWorkspace", Context.NONE);
+ manager.bookmarks().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
-### DataConnectors_Connect
+### DataConnectors_CreateOrUpdate
```java
-import com.azure.core.management.serializer.SerializerFactory;
-import com.azure.core.util.Context;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind;
-import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody;
-import java.io.IOException;
-import java.util.Arrays;
+import com.azure.resourcemanager.securityinsights.models.DataTypeState;
+import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector;
+import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes;
+import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange;
+import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint;
+import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams;
+import com.azure.resourcemanager.securityinsights.models.TIDataConnector;
+import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes;
+import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypesIndicators;
+import java.time.OffsetDateTime;
-/** Samples for DataConnectors Connect. */
-public final class DataConnectorsConnectSamples {
+/** Samples for DataConnectors CreateOrUpdate. */
+public final class DataConnectorsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/CreateOfficeDataConnetor.json
*/
/**
- * Sample code: Connect an APIPolling V2 logs data connector.
+ * Sample code: Creates or updates an Office365 data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void connectAnAPIPollingV2LogsDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException {
+ public static void createsOrUpdatesAnOffice365DataConnector(
+ com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.dataConnectors()
- .connectWithResponse(
- "myRg",
- "myWorkspace",
- "316ec55e-7138-4d63-ab18-90c8a60fd1c8",
- new DataConnectorConnectBody()
- .withKind(ConnectAuthKind.APIKEY)
- .withApiKey("fakeKeyPlaceholder")
- .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com")
- .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631")
- .withOutputStream("Custom-MyTableRawData")
- .withRequestConfigUserInputValues(
- Arrays
- .asList(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"displayText\":\"Organization"
- + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}",
- Object.class,
- SerializerEncoding.JSON))),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json
- */
- /**
- * Sample code: Connect an APIPolling data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void connectAnAPIPollingDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException {
- manager
- .dataConnectors()
- .connectWithResponse(
- "myRg",
- "myWorkspace",
- "316ec55e-7138-4d63-ab18-90c8a60fd1c8",
- new DataConnectorConnectBody()
- .withKind(ConnectAuthKind.APIKEY)
- .withApiKey("fakeKeyPlaceholder")
- .withRequestConfigUserInputValues(
- Arrays
- .asList(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"displayText\":\"Organization"
- + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}",
- Object.class,
- SerializerEncoding.JSON))),
- Context.NONE);
- }
-}
-```
-
-### DataConnectors_CreateOrUpdate
-
-```java
-import com.azure.core.management.serializer.SerializerFactory;
-import com.azure.core.util.Context;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.securityinsights.models.Availability;
-import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus;
-import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector;
-import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingAuthProperties;
-import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingConfigProperties;
-import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingPagingProperties;
-import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingRequestProperties;
-import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingResponseProperties;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesDataTypesItem;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesGraphQueriesItem;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesInstructionStepsItem;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesSampleQueriesItem;
-import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector;
-import com.azure.resourcemanager.securityinsights.models.ConnectivityType;
-import com.azure.resourcemanager.securityinsights.models.DataTypeState;
-import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector;
-import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes;
-import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities;
-import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem;
-import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes;
-import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs;
-import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector;
-import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector;
-import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes;
-import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange;
-import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint;
-import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams;
-import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes;
-import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypesLogs;
-import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector;
-import com.azure.resourcemanager.securityinsights.models.PermissionProviderScope;
-import com.azure.resourcemanager.securityinsights.models.Permissions;
-import com.azure.resourcemanager.securityinsights.models.PermissionsCustomsItem;
-import com.azure.resourcemanager.securityinsights.models.PermissionsResourceProviderItem;
-import com.azure.resourcemanager.securityinsights.models.PollingFrequency;
-import com.azure.resourcemanager.securityinsights.models.ProviderName;
-import com.azure.resourcemanager.securityinsights.models.RequiredPermissions;
-import com.azure.resourcemanager.securityinsights.models.SettingType;
-import com.azure.resourcemanager.securityinsights.models.TIDataConnector;
-import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes;
-import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypesIndicators;
-import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector;
-import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes;
-import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypesTaxiiClient;
-import java.io.IOException;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-
-/** Samples for DataConnectors CreateOrUpdate. */
-public final class DataConnectorsCreateOrUpdateSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json
- */
- /**
- * Sample code: Creates or updates an Office365 data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAnOffice365DataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
+ .createOrUpdateWithResponse(
"myRg",
"myWorkspace",
"73e01a99-5cd7-4139-a149-9f2736ff2ab5",
new OfficeDataConnector()
.withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
+ .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8")
.withDataTypes(
new OfficeDataConnectorDataTypes()
.withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED))
.withSharePoint(
new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED))
- .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED)))
- .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json
- */
- /**
- * Sample code: Creates or updates an Office PowerBI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAnOfficePowerBIDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
- new OfficePowerBIDataConnector()
- .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withDataTypes(
- new OfficePowerBIConnectorDataTypes()
- .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED)))
- .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json
- */
- /**
- * Sample code: Creates or updates a Threat Intelligence Taxii data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
- new TiTaxiiDataConnector()
- .withEtag("d12423f6-a60b-4ca5-88c0-feb1a182d0f0")
- .withWorkspaceId("dd124572-4962-4495-9bd2-9dade12314b4")
- .withFriendlyName("testTaxii")
- .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds")
- .withCollectionId("135")
- .withUsername("--")
- .withPassword("--")
- .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z"))
- .withPollingFrequency(PollingFrequency.ONCE_ADAY)
- .withDataTypes(
- new TiTaxiiDataConnectorDataTypes()
- .withTaxiiClient(
- new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED)))
- .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json
- */
- /**
- * Sample code: Creates or updates an Threat Intelligence Platform data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
- new TIDataConnector()
- .withTipLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z"))
- .withDataTypes(
- new TIDataConnectorDataTypes()
- .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED)))
- .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json
- */
- /**
- * Sample code: Creates or updates a Dynamics365 data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesADynamics365DataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "c2541efb-c9a6-47fe-9501-87d1017d1512",
- new Dynamics365DataConnector()
- .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withDataTypes(
- new Dynamics365DataConnectorDataTypes()
- .withDynamics365CdsActivities(
- new Dynamics365DataConnectorDataTypesDynamics365CdsActivities()
- .withState(DataTypeState.ENABLED)))
- .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json
- */
- /**
- * Sample code: Creates or updates a GenericUI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAGenericUIDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "316ec55e-7138-4d63-ab18-90c8a60fd1c8",
- new CodelessUiDataConnector()
- .withConnectorUiConfig(
- new CodelessUiConnectorConfigProperties()
- .withTitle("Qualys Vulnerability Management (CCP DEMO)")
- .withPublisher("Qualys")
- .withDescriptionMarkdown(
- "The [Qualys Vulnerability Management"
- + " (VM)](https://www.qualys.com/apps/vulnerability-management/) data connector"
- + " provides the capability to ingest vulnerability host detection data into Azure"
- + " Sentinel through the Qualys API. The connector provides visibility into host"
- + " detection data from vulerability scans. This connector provides Azure Sentinel"
- + " the capability to view dashboards, create custom alerts, and improve"
- + " investigation ")
- .withGraphQueriesTableName("QualysHostDetection_CL")
- .withGraphQueries(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesGraphQueriesItem()
- .withMetricName("Total data received")
- .withLegend("{{graphQueriesTableName}}")
- .withBaseQuery("{{graphQueriesTableName}}")))
- .withSampleQueries(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesSampleQueriesItem()
- .withDescription("Top 10 Vulerabilities detected")
- .withQuery(
- "{{graphQueriesTableName}}\n"
- + " | mv-expand todynamic(Detections_s)\n"
- + " | extend Vulnerability = tostring(Detections_s.Results)\n"
- + " | summarize count() by Vulnerability\n"
- + " | top 10 by count_")))
- .withDataTypes(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesDataTypesItem()
- .withName("{{graphQueriesTableName}}")
- .withLastDataReceivedQuery(
- "{{graphQueriesTableName}}\n"
- + " | summarize Time = max(TimeGenerated)\n"
- + " | where isnotempty(Time)")))
- .withConnectivityCriteria(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem()
- .withType(ConnectivityType.IS_CONNECTED_QUERY)
- .withValue(
- Arrays
- .asList(
- "{{graphQueriesTableName}}\n"
- + " | summarize LastLogReceived ="
- + " max(TimeGenerated)\n"
- + " | project IsConnected = LastLogReceived >"
- + " ago(30d)"))))
- .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true))
- .withPermissions(
- new Permissions()
- .withResourceProvider(
- Arrays
- .asList(
- new PermissionsResourceProviderItem()
- .withProvider(
- ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES)
- .withPermissionsDisplayText(
- "read and write permissions on the workspace are required.")
- .withProviderDisplayName("Workspace")
- .withScope(PermissionProviderScope.WORKSPACE)
- .withRequiredPermissions(
- new RequiredPermissions()
- .withWrite(true)
- .withRead(true)
- .withDelete(true)),
- new PermissionsResourceProviderItem()
- .withProvider(
- ProviderName
- .MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_SHARED_KEYS)
- .withPermissionsDisplayText(
- "read permissions to shared keys for the workspace are"
- + " required. [See the documentation to learn more about"
- + " workspace"
- + " keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).")
- .withProviderDisplayName("Keys")
- .withScope(PermissionProviderScope.WORKSPACE)
- .withRequiredPermissions(
- new RequiredPermissions().withAction(true))))
- .withCustoms(
- Arrays
- .asList(
- new PermissionsCustomsItem()
- .withName("Microsoft.Web/sites permissions")
- .withDescription(
- "Read and write permissions to Azure Functions to create a"
- + " Function App is required. [See the documentation to"
- + " learn more about Azure"
- + " Functions](https://docs.microsoft.com/azure/azure-functions/)."),
- new PermissionsCustomsItem()
- .withName("Qualys API Key")
- .withDescription(
- "A Qualys VM API username and password is required. [See the"
- + " documentation to learn more about Qualys VM"
- + " API](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf)."))))
- .withInstructionSteps(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- ">**NOTE:** This connector uses Azure Functions to connect to Qualys VM"
- + " to pull its logs into Azure Sentinel. This might result in"
- + " additional data ingestion costs. Check the [Azure Functions"
- + " pricing"
- + " page](https://azure.microsoft.com/pricing/details/functions/)"
- + " for details."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- ">**(Optional Step)** Securely store workspace and API authorization"
- + " key(s) or token(s) in Azure Key Vault. Azure Key Vault provides"
- + " a secure mechanism to store and retrieve key values. [Follow"
- + " these"
- + " instructions](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)"
- + " to use Azure Key Vault with an Azure Function App."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- "**STEP 1 - Configuration steps for the Qualys VM API**\n\n"
- + "1. Log into the Qualys Vulnerability Management console with an"
- + " administrator account, select the **Users** tab and the"
- + " **Users** subtab. \n"
- + "2. Click on the **New** drop-down menu and select **Users..**\n"
- + "3. Create a username and password for the API account. \n"
- + "4. In the **User Roles** tab, ensure the account role is set to"
- + " **Manager** and access is allowed to **GUI** and **API**\n"
- + "4. Log out of the administrator account and log into the console"
- + " with the new API credentials for validation, then log out of"
- + " the API account. \n"
- + "5. Log back into the console using an administrator account and"
- + " modify the API accounts User Roles, removing access to **GUI**."
- + " \n"
- + "6. Save all changes."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- "**STEP 2 - Choose ONE from the following two deployment options to"
- + " deploy the connector and the associated Azure Function**\n\n"
- + ">**IMPORTANT:** Before deploying the Qualys VM connector, have"
- + " the Workspace ID and Workspace Primary Key (can be copied from"
- + " the following), as well as the Qualys VM API Authorization"
- + " Key(s), readily available.")
- .withInstructions(
- Arrays
- .asList(
- new InstructionStepsInstructionsItem()
- .withParameters(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"fillWith\":[\"WorkspaceId\"],\"label\":\"Workspace"
- + " ID\"}",
- Object.class,
- SerializerEncoding.JSON))
- .withType(SettingType.COPYABLE_LABEL),
- new InstructionStepsInstructionsItem()
- .withParameters(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"fillWith\":[\"PrimaryKey\"],\"label\":\"Primary"
- + " Key\"}",
- Object.class,
- SerializerEncoding.JSON))
- .withType(SettingType.COPYABLE_LABEL))),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("Option 1 - Azure Resource Manager (ARM) Template")
- .withDescription(
- "Use this method for automated deployment of the Qualys VM connector"
- + " using an ARM Tempate.\n\n"
- + "1. Click the **Deploy to Azure** button below. \n\n"
- + "\t[![Deploy To"
- + " Azure](https://aka.ms/deploytoazurebutton)](https://aka.ms/sentinelqualysvmazuredeploy)\n"
- + "2. Select the preferred **Subscription**, **Resource Group** and"
- + " **Location**. \n"
- + "3. Enter the **Workspace ID**, **Workspace Key**, **API"
- + " Username**, **API Password** , update the **URI**, and any"
- + " additional URI **Filter Parameters** (each filter should be"
- + " separated by an \"&\" symbol, no spaces.) \n"
- + "> - Enter the URI that corresponds to your region. The complete"
- + " list of API Server URLs can be [found"
- + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)"
- + " -- There is no need to add a time suffix to the URI, the"
- + " Function App will dynamically append the Time Value to the URI"
- + " in the proper format. \n"
- + " - The default **Time Interval** is set to pull the last five"
- + " (5) minutes of data. If the time interval needs to be modified,"
- + " it is recommended to change the Function App Timer Trigger"
- + " accordingly (in the function.json file, post deployment) to"
- + " prevent overlapping data ingestion. \n"
- + "> - Note: If using Azure Key Vault secrets for any of the values"
- + " above, use the`@Microsoft.KeyVault(SecretUri={Security"
- + " Identifier})`schema in place of the string values. Refer to"
- + " [Key Vault references"
- + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)"
- + " for further details. \n"
- + "4. Mark the checkbox labeled **I agree to the terms and"
- + " conditions stated above**. \n"
- + "5. Click **Purchase** to deploy."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("Option 2 - Manual Deployment of Azure Functions")
- .withDescription(
- "Use the following step-by-step instructions to deploy the Quayls VM"
- + " connector manually with Azure Functions."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- "**1. Create a Function App**\n\n"
- + "1. From the Azure Portal, navigate to [Function"
- + " App](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp),"
- + " and select **+ Add**.\n"
- + "2. In the **Basics** tab, ensure Runtime stack is set to"
- + " **Powershell Core**. \n"
- + "3. In the **Hosting** tab, ensure the **Consumption"
- + " (Serverless)** plan type is selected.\n"
- + "4. Make other preferrable configuration changes, if needed, then"
- + " click **Create**."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- "**2. Import Function App Code**\n\n"
- + "1. In the newly created Function App, select **Functions** on"
- + " the left pane and click **+ New Function**.\n"
- + "2. Select **Timer Trigger**.\n"
- + "3. Enter a unique Function **Name** and leave the default cron"
- + " schedule of every 5 minutes, then click **Create**.\n"
- + "5. Click on **Code + Test** on the left pane. \n"
- + "6. Copy the [Function App"
- + " Code](https://aka.ms/sentinelqualysvmazurefunctioncode) and"
- + " paste into the Function App `run.ps1` editor.\n"
- + "7. Click **Save**."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- "**3. Configure the Function App**\n\n"
- + "1. In the Function App, select the Function App Name and select"
- + " **Configuration**.\n"
- + "2. In the **Application settings** tab, select **+ New"
- + " application setting**.\n"
- + "3. Add each of the following seven (7) application settings"
- + " individually, with their respective string values"
- + " (case-sensitive): \n"
- + "\t\tapiUsername\n"
- + "\t\tapiPassword\n"
- + "\t\tworkspaceID\n"
- + "\t\tworkspaceKey\n"
- + "\t\turi\n"
- + "\t\tfilterParameters\n"
- + "\t\ttimeInterval\n"
- + "> - Enter the URI that corresponds to your region. The complete"
- + " list of API Server URLs can be [found"
- + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)."
- + " The `uri` value must follow the following schema: `https:///api/2.0/fo/asset/host/vm/detection/?action=list&vm_processed_after=`"
- + " -- There is no need to add a time suffix to the URI, the"
- + " Function App will dynamically append the Time Value to the URI"
- + " in the proper format.\n"
- + "> - Add any additional filter parameters, for the"
- + " `filterParameters` variable, that need to be appended to the"
- + " URI. Each parameter should be seperated by an \"&\" symbol and"
- + " should not include any spaces.\n"
- + "> - Set the `timeInterval` (in minutes) to the value of `5` to"
- + " correspond to the Timer Trigger of every `5` minutes. If the"
- + " time interval needs to be modified, it is recommended to change"
- + " the Function App Timer Trigger accordingly to prevent"
- + " overlapping data ingestion.\n"
- + "> - Note: If using Azure Key Vault, use"
- + " the`@Microsoft.KeyVault(SecretUri={Security Identifier})`schema"
- + " in place of the string values. Refer to [Key Vault references"
- + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)"
- + " for further details.\n"
- + "4. Once all application settings have been entered, click"
- + " **Save**."),
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("")
- .withDescription(
- "**4. Configure the host.json**.\n\n"
- + "Due to the potentially large amount of Qualys host detection"
- + " data being ingested, it can cause the execution time to surpass"
- + " the default Function App timeout of five (5) minutes. Increase"
- + " the default timeout duration to the maximum of ten (10)"
- + " minutes, under the Consumption Plan, to allow more time for the"
- + " Function App to execute.\n\n"
- + "1. In the Function App, select the Function App Name and select"
- + " the **App Service Editor** blade.\n"
- + "2. Click **Go** to open the editor, then select the"
- + " **host.json** file under the **wwwroot** directory.\n"
- + "3. Add the line `\"functionTimeout\": \"00:10:00\",` above the"
- + " `managedDependancy` line \n"
- + "4. Ensure **SAVED** appears on the top right corner of the"
- + " editor, then exit the editor.\n\n"
- + "> NOTE: If a longer timeout duration is required, consider"
- + " upgrading to an [App Service"
- + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json
- */
- /**
- * Sample code: Creates or updates an Office365 Project data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAnOffice365ProjectDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
- new Office365ProjectDataConnector()
- .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withDataTypes(
- new Office365ProjectConnectorDataTypes()
- .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED)))
- .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateAPIPolling.json
- */
- /**
- * Sample code: Creates or updates a APIPolling data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsOrUpdatesAAPIPollingDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException {
- manager
- .dataConnectors()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "316ec55e-7138-4d63-ab18-90c8a60fd1c8",
- new CodelessApiPollingDataConnector()
- .withConnectorUiConfig(
- new CodelessUiConnectorConfigProperties()
- .withTitle("GitHub Enterprise Audit Log")
- .withPublisher("GitHub")
- .withDescriptionMarkdown(
- "The GitHub audit log connector provides the capability to ingest GitHub logs into"
- + " Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can"
- + " view this data in workbooks, use it to create custom alerts, and improve your"
- + " investigation process.")
- .withGraphQueriesTableName("GitHubAuditLogPolling_CL")
- .withGraphQueries(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesGraphQueriesItem()
- .withMetricName("Total events received")
- .withLegend("GitHub audit log events")
- .withBaseQuery("{{graphQueriesTableName}}")))
- .withSampleQueries(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesSampleQueriesItem()
- .withDescription("All logs")
- .withQuery("{{graphQueriesTableName}}\n | take 10 ")))
- .withDataTypes(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesDataTypesItem()
- .withName("{{graphQueriesTableName}}")
- .withLastDataReceivedQuery(
- "{{graphQueriesTableName}}\n"
- + " | summarize Time = max(TimeGenerated)\n"
- + " | where isnotempty(Time)")))
- .withConnectivityCriteria(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem()
- .withType(ConnectivityType.fromString("SentinelKindsV2"))
- .withValue(Arrays.asList())))
- .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true))
- .withPermissions(
- new Permissions()
- .withResourceProvider(
- Arrays
- .asList(
- new PermissionsResourceProviderItem()
- .withProvider(
- ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES)
- .withPermissionsDisplayText(
- "read and write permissions are required.")
- .withProviderDisplayName("Workspace")
- .withScope(PermissionProviderScope.WORKSPACE)
- .withRequiredPermissions(
- new RequiredPermissions()
- .withWrite(true)
- .withRead(true)
- .withDelete(true))))
- .withCustoms(
- Arrays
- .asList(
- new PermissionsCustomsItem()
- .withName("GitHub API personal token Key")
- .withDescription(
- "You need access to GitHub personal token, the key should have"
- + " 'admin:org' scope"))))
- .withInstructionSteps(
- Arrays
- .asList(
- new CodelessUiConnectorConfigPropertiesInstructionStepsItem()
- .withTitle("Connect GitHub Enterprise Audit Log to Azure Sentinel")
- .withDescription(
- "Enable GitHub audit Logs. \n"
- + " Follow"
- + " [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)"
- + " to create or find your personal key")
- .withInstructions(
- Arrays
- .asList(
- new InstructionStepsInstructionsItem()
- .withParameters(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"enable\":\"true\",\"userRequestPlaceHoldersInput\":[{\"displayText\":\"Organization"
- + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"\",\"requestObjectKey\":\"apiEndpoint\"}]}",
- Object.class,
- SerializerEncoding.JSON))
- .withType(SettingType.fromString("APIKey")))))))
- .withPollingConfig(
- new CodelessConnectorPollingConfigProperties()
- .withAuth(
- new CodelessConnectorPollingAuthProperties()
- .withAuthType("APIKey")
- .withApiKeyName("Authorization")
- .withApiKeyIdentifier("token"))
- .withRequest(
- new CodelessConnectorPollingRequestProperties()
- .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log")
- .withRateLimitQps(50)
- .withQueryWindowInMin(15)
- .withHttpMethod("Get")
- .withQueryTimeFormat("yyyy-MM-ddTHH:mm:ssZ")
- .withRetryCount(2)
- .withTimeoutInSeconds(60)
- .withHeaders(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"Accept\":\"application/json\",\"User-Agent\":\"Scuba\"}",
- Object.class,
- SerializerEncoding.JSON))
- .withQueryParameters(
- SerializerFactory
- .createDefaultManagementSerializerAdapter()
- .deserialize(
- "{\"phrase\":\"created:{_QueryWindowStartTime}..{_QueryWindowEndTime}\"}",
- Object.class,
- SerializerEncoding.JSON)))
- .withPaging(
- new CodelessConnectorPollingPagingProperties()
- .withPagingType("LinkHeader")
- .withPageSizeParaName("per_page"))
- .withResponse(
- new CodelessConnectorPollingResponseProperties()
- .withEventsJsonPaths(Arrays.asList("$")))),
- Context.NONE);
- }
-}
-```
-
-### DataConnectors_Delete
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for DataConnectors Delete. */
-public final class DataConnectorsDeleteSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json
- */
- /**
- * Sample code: Delete an Office365 Project data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAnOffice365ProjectDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteGenericUI.json
- */
- /**
- * Sample code: Delete a GenericUI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAGenericUIDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json
- */
- /**
- * Sample code: Delete an Office365 data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAnOffice365DataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json
- */
- /**
- * Sample code: Delete an Office PowerBI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAnOfficePowerBIDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json
- */
- /**
- * Sample code: Delete a APIPolling data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAAPIPollingDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE);
- }
-}
-```
-
-### DataConnectors_Disconnect
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for DataConnectors Disconnect. */
-public final class DataConnectorsDisconnectSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json
- */
- /**
- * Sample code: Disconnect an APIPolling data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void disconnectAnAPIPollingDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE);
- }
-}
-```
-
-### DataConnectors_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for DataConnectors Get. */
-public final class DataConnectorsGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json
- */
- /**
- * Sample code: Get an Office365 Project data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnOffice365ProjectDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetGenericUI.json
- */
- /**
- * Sample code: Get a GenericUI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAGenericUIDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json
- */
- /**
- * Sample code: Get an Office ATP data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnOfficeATPDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json
- */
- /**
- * Sample code: Get a IoT data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAIoTDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json
- */
- /**
- * Sample code: Get a MCAS data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMCASDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json
- */
- /**
- * Sample code: Get a TI Taxii data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getATITaxiiDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json
- */
- /**
- * Sample code: Get a MicrosoftThreatIntelligence data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMicrosoftThreatIntelligenceDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json
- */
- /**
- * Sample code: Get a ASC data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAASCDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json
- */
- /**
- * Sample code: Get a TI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json
- */
- /**
- * Sample code: Get an AwsCloudTrail data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnAwsCloudTrailDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json
- */
- /**
- * Sample code: Get a MDATP data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMDATPDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json
- */
- /**
- * Sample code: Get a MicrosoftThreatProtection data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMicrosoftThreatProtectionDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json
- */
- /**
- * Sample code: Get an AAD data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnAADDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json
- */
- /**
- * Sample code: Get an AATP data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnAATPDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json
- */
- /**
- * Sample code: Get a APIPolling data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAAPIPollingDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json
- */
- /**
- * Sample code: Get an Office IRM data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnOfficeIRMDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json
- */
- /**
- * Sample code: Get a Dynamics365 data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getADynamics365DataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json
- */
- /**
- * Sample code: Get an Office365 data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnOffice365DataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json
- */
- /**
- * Sample code: Get an Aws S3 data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnAwsS3DataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json
- */
- /**
- * Sample code: Get an Office365 PowerBI data connector.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnOffice365PowerBIDataConnector(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectors()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
- }
-}
-```
-
-### DataConnectors_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for DataConnectors List. */
-public final class DataConnectorsListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json
- */
- /**
- * Sample code: Get all data connectors.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllDataConnectors(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE);
- }
-}
-```
-
-### DataConnectorsCheckRequirementsOperation_Post
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.OfficeAtpCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.OfficePowerBICheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.TICheckRequirements;
-import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirements;
-
-/** Samples for DataConnectorsCheckRequirementsOperation Post. */
-public final class DataConnectorsCheckRequirementsOperationPostSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json
- */
- /**
- * Sample code: Check requirements for OfficeATP.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForOfficeATP(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json
- */
- /**
- * Sample code: Check requirements for Office365Project.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForOffice365Project(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json
- */
- /**
- * Sample code: Check requirements for AAD.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForAAD(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json
- */
- /**
- * Sample code: Check requirements for Mcas.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForMcas(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsIoT.json
- */
- /**
- * Sample code: Check requirements for IoT.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForIoT(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse(
- "myRg",
- "myWorkspace",
- new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json
- */
- /**
- * Sample code: Check requirements for Mdatp.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForMdatp(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json
- */
- /**
- * Sample code: Check requirements for AAD - no authorization.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForAADNoAuthorization(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json
- */
- /**
- * Sample code: Check requirements for ASC.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForASC(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse(
- "myRg",
- "myWorkspace",
- new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"),
- Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json
- */
- /**
- * Sample code: Check requirements for MicrosoftThreatProtection.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForMicrosoftThreatProtection(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json
- */
- /**
- * Sample code: Check requirements for TI Taxii.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForTITaxii(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json
- */
- /**
- * Sample code: Check requirements for OfficeIRM.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForOfficeIRM(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json
- */
- /**
- * Sample code: Check requirements for MicrosoftThreatIntelligence.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForMicrosoftThreatIntelligence(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json
- */
- /**
- * Sample code: Check requirements for OfficePowerBI.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForOfficePowerBI(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json
- */
- /**
- * Sample code: Check requirements for Dynamics365.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForDynamics365(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json
- */
- /**
- * Sample code: Check requirements for AAD - no license.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForAADNoLicense(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json
- */
- /**
- * Sample code: Check requirements for TI.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void checkRequirementsForTI(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .dataConnectorsCheckRequirementsOperations()
- .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE);
- }
-}
-```
-
-### DomainWhois_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for DomainWhois Get. */
-public final class DomainWhoisGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json
- */
- /**
- * Sample code: Get whois information for a single domain name.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getWhoisInformationForASingleDomainName(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE);
- }
-}
-```
-
-### Entities_Expand
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters;
-import java.time.OffsetDateTime;
-import java.util.UUID;
-
-/** Samples for Entities Expand. */
-public final class EntitiesExpandSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json
- */
- /**
- * Sample code: Expand an entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void expandAnEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .entities()
- .expandWithResponse(
- "myRg",
- "myWorkspace",
- "e1d3d618-e11f-478b-98e3-bb381539a8e1",
- new EntityExpandParameters()
- .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z"))
- .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a"))
- .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")),
- Context.NONE);
- }
-}
-```
-
-### Entities_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for Entities Get. */
-public final class EntitiesGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json
- */
- /**
- * Sample code: Get a submissionMail entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getASubmissionMailEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json
- */
- /**
- * Sample code: Get a dns entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json
- */
- /**
- * Sample code: Get a file hash entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json
- */
- /**
- * Sample code: Get an IoT device entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnIoTDeviceEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json
- */
- /**
- * Sample code: Get a registry key entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getARegistryKeyEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json
- */
- /**
- * Sample code: Get a mailbox entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json
- */
- /**
- * Sample code: Get a malware entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json
- */
- /**
- * Sample code: Get a security alert entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getASecurityAlertEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json
- */
- /**
- * Sample code: Get an ip entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json
- */
- /**
- * Sample code: Get an account entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json
- */
- /**
- * Sample code: Get a cloud application entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getACloudApplicationEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json
- */
- /**
- * Sample code: Get a file entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json
- */
- /**
- * Sample code: Get a registry value entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getARegistryValueEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json
- */
- /**
- * Sample code: Get a url entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json
- */
- /**
- * Sample code: Get a mailCluster entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMailClusterEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json
- */
- /**
- * Sample code: Get a security group entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getASecurityGroupEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json
- */
- /**
- * Sample code: Get a mailMessage entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAMailMessageEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json
- */
- /**
- * Sample code: Get an azure resource entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnAzureResourceEntity(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json
- */
- /**
- * Sample code: Get a host entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE);
- }
-
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json
- */
- /**
- * Sample code: Get a process entity.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE);
- }
-}
-```
-
-### Entities_GetInsights
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.UUID;
-
-/** Samples for Entities GetInsights. */
-public final class EntitiesGetInsightsSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json
- */
- /**
- * Sample code: Entity Insight.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void entityInsight(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .entities()
- .getInsightsWithResponse(
- "myRg",
- "myWorkspace",
- "e1d3d618-e11f-478b-98e3-bb381539a8e1",
- new EntityGetInsightsParameters()
- .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z"))
- .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z"))
- .withAddDefaultExtendedTimeRange(false)
- .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))),
- Context.NONE);
- }
-}
-```
-
-### Entities_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for Entities List. */
-public final class EntitiesListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json
- */
- /**
- * Sample code: Get all entities.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entities().list("myRg", "myWorkspace", Context.NONE);
- }
-}
-```
-
-### Entities_Queries
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind;
-
-/** Samples for Entities Queries. */
-public final class EntitiesQueriesSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json
- */
- /**
- * Sample code: Get Entity Query.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .entities()
- .queriesWithResponse(
- "myRg",
- "myWorkspace",
- "e1d3d618-e11f-478b-98e3-bb381539a8e1",
- EntityItemQueryKind.INSIGHT,
- Context.NONE);
+ .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))),
+ com.azure.core.util.Context.NONE);
}
-}
-```
-
-### EntitiesGetTimeline_List
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters;
-import java.time.OffsetDateTime;
-/** Samples for EntitiesGetTimeline List. */
-public final class EntitiesGetTimelineListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json
*/
/**
- * Sample code: Entity timeline.
+ * Sample code: Creates or updates an Threat Intelligence Platform data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void entityTimeline(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
+ public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector(
+ com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entitiesGetTimelines()
- .listWithResponse(
+ .dataConnectors()
+ .createOrUpdateWithResponse(
"myRg",
"myWorkspace",
- "e1d3d618-e11f-478b-98e3-bb381539a8e1",
- new EntityTimelineParameters()
- .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z"))
- .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z"))
- .withNumberOfBucket(4),
- Context.NONE);
+ "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
+ new TIDataConnector()
+ .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b")
+ .withTipLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z"))
+ .withDataTypes(
+ new TIDataConnectorDataTypes()
+ .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))),
+ com.azure.core.util.Context.NONE);
}
}
```
-### EntitiesRelations_List
+### DataConnectors_Delete
```java
-import com.azure.core.util.Context;
-
-/** Samples for EntitiesRelations List. */
-public final class EntitiesRelationsListSamples {
+/** Samples for DataConnectors Delete. */
+public final class DataConnectorsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/DeleteOfficeDataConnetor.json
*/
/**
- * Sample code: Get all relations of an entity.
+ * Sample code: Delete an Office365 data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAllRelationsOfAnEntity(
+ public static void deleteAnOffice365DataConnector(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entitiesRelations()
- .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE);
+ .dataConnectors()
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
-### EntityQueries_CreateOrUpdate
+### DataConnectors_Get
```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery;
-import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions;
-import com.azure.resourcemanager.securityinsights.models.EntityType;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for EntityQueries CreateOrUpdate. */
-public final class EntityQueriesCreateOrUpdateSamples {
+/** Samples for DataConnectors Get. */
+public final class DataConnectorsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureSecurityCenterById.json
*/
/**
- * Sample code: Creates or updates an Activity entity query.
+ * Sample code: Get a ASC data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void createsOrUpdatesAnActivityEntityQuery(
+ public static void getAASCDataConnector(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entityQueries()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "07da3cc8-c8ad-4710-a44e-334cdcb7882b",
- new ActivityCustomEntityQuery()
- .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withTitle("An account was deleted on this host")
- .withContent("On '{{Computer}}' the account '{{TargetAccount}}' was deleted by '{{AddedBy}}'")
- .withDescription("Account deleted on host")
- .withQueryDefinitions(
- new ActivityEntityQueriesPropertiesQueryDefinitions()
- .withQuery(
- "let GetAccountActions = (v_Host_Name:string, v_Host_NTDomain:string,"
- + " v_Host_DnsDomain:string, v_Host_AzureID:string, v_Host_OMSAgentID:string){\n"
- + "SecurityEvent\n"
- + "| where EventID in (4725, 4726, 4767, 4720, 4722, 4723, 4724)\n"
- + "// parsing for Host to handle variety of conventions coming from data\n"
- + "| extend Host_HostName = case(\n"
- + "Computer has '@', tostring(split(Computer, '@')[0]),\n"
- + "Computer has '\\\\', tostring(split(Computer, '\\\\')[1]),\n"
- + "Computer has '.', tostring(split(Computer, '.')[0]),\n"
- + "Computer\n"
- + ")\n"
- + "| extend Host_NTDomain = case(\n"
- + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n"
- + "Computer has '.', tostring(split(Computer, '.')[-2]), \n"
- + "Computer\n"
- + ")\n"
- + "| extend Host_DnsDomain = case(\n"
- + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n"
- + "Computer has '.', strcat_array(array_slice(split(Computer,'.'),-2,-1),'.'), \n"
- + "Computer\n"
- + ")\n"
- + "| where (Host_HostName =~ v_Host_Name and Host_NTDomain =~ v_Host_NTDomain) \n"
- + "or (Host_HostName =~ v_Host_Name and Host_DnsDomain =~ v_Host_DnsDomain) \n"
- + "or v_Host_AzureID =~ _ResourceId \n"
- + "or v_Host_OMSAgentID == SourceComputerId\n"
- + "| project TimeGenerated, EventID, Activity, Computer, TargetAccount,"
- + " TargetUserName, TargetDomainName, TargetSid, SubjectUserName, SubjectUserSid,"
- + " _ResourceId, SourceComputerId\n"
- + "| extend AddedBy = SubjectUserName\n"
- + "// Future support for Activities\n"
- + "| extend timestamp = TimeGenerated, HostCustomEntity = Computer,"
- + " AccountCustomEntity = TargetAccount\n"
- + "};\n"
- + "GetAccountActions('{{Host_HostName}}', '{{Host_NTDomain}}',"
- + " '{{Host_DnsDomain}}', '{{Host_AzureID}}', '{{Host_OMSAgentID}}')\n"
- + " \n"
- + "| where EventID == 4726 "))
- .withInputEntityType(EntityType.HOST)
- .withRequiredInputFieldsSets(
- Arrays
- .asList(
- Arrays.asList("Host_HostName", "Host_NTDomain"),
- Arrays.asList("Host_HostName", "Host_DnsDomain"),
- Arrays.asList("Host_AzureID"),
- Arrays.asList("Host_OMSAgentID")))
- .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows")))
- .withEnabled(true),
- Context.NONE);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", com.azure.core.util.Context.NONE);
}
-}
-```
-
-### EntityQueries_Delete
-```java
-import com.azure.core.util.Context;
-
-/** Samples for EntityQueries Delete. */
-public final class EntityQueriesDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetOfficeDataConnetorById.json
*/
/**
- * Sample code: Delete an entity query.
+ * Sample code: Get an Office365 data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
+ public static void getAnOffice365DataConnector(
+ com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entityQueries()
- .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
-}
-```
-
-### EntityQueries_Get
-
-```java
-import com.azure.core.util.Context;
-/** Samples for EntityQueries Get. */
-public final class EntityQueriesGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json
*/
/**
- * Sample code: Get an Activity entity query.
+ * Sample code: Get a MCAS data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAnActivityEntityQuery(
+ public static void getAMCASDataConnector(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entityQueries()
- .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json
*/
/**
- * Sample code: Get an Expansion entity query.
+ * Sample code: Get an AwsCloudTrail data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAnExpansionEntityQuery(
+ public static void getAnAwsCloudTrailDataConnector(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entityQueries()
- .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE);
- }
-}
-```
-
-### EntityQueries_List
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind;
-
-/** Samples for EntityQueries List. */
-public final class EntityQueriesListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json
- */
- /**
- * Sample code: Get all entity queries.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE);
}
-}
-```
-
-### EntityQueryTemplates_Get
-```java
-import com.azure.core.util.Context;
-
-/** Samples for EntityQueryTemplates Get. */
-public final class EntityQueryTemplatesGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json
*/
/**
- * Sample code: Get an Activity entity query template.
+ * Sample code: Get an AATP data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAnActivityEntityQueryTemplate(
+ public static void getAnAATPDataConnector(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entityQueryTemplates()
- .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.Context.NONE);
}
-}
-```
-### EntityQueryTemplates_List
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.Constant88;
-
-/** Samples for EntityQueryTemplates List. */
-public final class EntityQueryTemplatesListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json
*/
/**
- * Sample code: Get all entity query templates.
+ * Sample code: Get a MDATP data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAllEntityQueryTemplates(
+ public static void getAMDATPDataConnector(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE);
- }
-}
-```
-
-### EntityRelations_GetRelation
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for EntityRelations GetRelation. */
-public final class EntityRelationsGetRelationSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json
- */
- /**
- * Sample code: Get an entity relation.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnEntityRelation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .entityRelations()
- .getRelationWithResponse(
- "myRg",
- "myWorkspace",
- "afbd324f-6c48-459c-8710-8d1e1cd03812",
- "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.Context.NONE);
}
-}
-```
-
-### FileImports_Create
-
-```java
-import com.azure.resourcemanager.securityinsights.models.FileFormat;
-import com.azure.resourcemanager.securityinsights.models.FileImportContentType;
-import com.azure.resourcemanager.securityinsights.models.FileMetadata;
-import com.azure.resourcemanager.securityinsights.models.IngestionMode;
-/** Samples for FileImports Create. */
-public final class FileImportsCreateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetThreatIntelligenceById.json
*/
/**
- * Sample code: Create a file import.
+ * Sample code: Get a TI data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void createAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
+ public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .fileImports()
- .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5")
- .withExistingWorkspace("myRg", "myWorkspace")
- .withIngestionMode(IngestionMode.INGEST_ANY_VALID_RECORDS)
- .withContentType(FileImportContentType.STIX_INDICATOR)
- .withImportFile(
- new FileMetadata().withFileFormat(FileFormat.JSON).withFileName("myFile.json").withFileSize(4653))
- .withSource("mySource")
- .create();
- }
-}
-```
-
-### FileImports_Delete
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for FileImports Delete. */
-public final class FileImportsDeleteSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json
- */
- /**
- * Sample code: Delete a file import.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE);
}
-}
-```
-
-### FileImports_Get
-```java
-import com.azure.core.util.Context;
-
-/** Samples for FileImports Get. */
-public final class FileImportsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureActiveDirectoryById.json
*/
/**
- * Sample code: Get a file import.
+ * Sample code: Get an AAD data connector.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
+ public static void getAnAADDataConnector(
+ com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
- .fileImports()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .dataConnectors()
+ .getWithResponse(
+ "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE);
}
}
```
-### FileImports_List
+### DataConnectors_List
```java
-import com.azure.core.util.Context;
-
-/** Samples for FileImports List. */
-public final class FileImportsListSamples {
+/** Samples for DataConnectors List. */
+public final class DataConnectorsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetDataConnectors.json
*/
/**
- * Sample code: Get all file imports.
+ * Sample code: Get all data connectors.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .fileImports()
- .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE);
+ public static void getAllDataConnectors(
+ com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
+ manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -3775,7 +979,7 @@ public final class FileImportsListSamples {
/** Samples for IncidentComments CreateOrUpdate. */
public final class IncidentCommentsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/CreateIncidentComment.json
*/
/**
* Sample code: Creates or updates an incident comment.
@@ -3797,12 +1001,10 @@ public final class IncidentCommentsCreateOrUpdateSamples {
### IncidentComments_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for IncidentComments Delete. */
public final class IncidentCommentsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/DeleteIncidentComment.json
*/
/**
* Sample code: Delete the incident comment.
@@ -3818,7 +1020,7 @@ public final class IncidentCommentsDeleteSamples {
"myWorkspace",
"73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -3826,12 +1028,10 @@ public final class IncidentCommentsDeleteSamples {
### IncidentComments_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for IncidentComments Get. */
public final class IncidentCommentsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/GetIncidentCommentById.json
*/
/**
* Sample code: Get an incident comment.
@@ -3847,7 +1047,7 @@ public final class IncidentCommentsGetSamples {
"myWorkspace",
"73e01a99-5cd7-4139-a149-9f2736ff2ab5",
"4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -3855,12 +1055,10 @@ public final class IncidentCommentsGetSamples {
### IncidentComments_List
```java
-import com.azure.core.util.Context;
-
/** Samples for IncidentComments List. */
public final class IncidentCommentsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/GetAllIncidentComments.json
*/
/**
* Sample code: Get all incident comments.
@@ -3871,7 +1069,15 @@ public final class IncidentCommentsListSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidentComments()
- .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE);
+ .list(
+ "myRg",
+ "myWorkspace",
+ "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -3879,13 +1085,10 @@ public final class IncidentCommentsListSamples {
### IncidentRelations_CreateOrUpdate
```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner;
-
/** Samples for IncidentRelations CreateOrUpdate. */
public final class IncidentRelationsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/CreateIncidentRelation.json
*/
/**
* Sample code: Creates or updates an incident relation.
@@ -3896,15 +1099,11 @@ public final class IncidentRelationsCreateOrUpdateSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidentRelations()
- .createOrUpdateWithResponse(
- "myRg",
- "myWorkspace",
- "afbd324f-6c48-459c-8710-8d1e1cd03812",
- "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- new RelationInner()
- .withRelatedResourceId(
- "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"),
- Context.NONE);
+ .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014")
+ .withExistingIncident("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812")
+ .withRelatedResourceId(
+ "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096")
+ .create();
}
}
```
@@ -3912,12 +1111,10 @@ public final class IncidentRelationsCreateOrUpdateSamples {
### IncidentRelations_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for IncidentRelations Delete. */
public final class IncidentRelationsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/DeleteIncidentRelation.json
*/
/**
* Sample code: Delete the incident relation.
@@ -3933,7 +1130,7 @@ public final class IncidentRelationsDeleteSamples {
"myWorkspace",
"afbd324f-6c48-459c-8710-8d1e1cd03812",
"4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -3941,12 +1138,10 @@ public final class IncidentRelationsDeleteSamples {
### IncidentRelations_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for IncidentRelations Get. */
public final class IncidentRelationsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/GetIncidentRelationByName.json
*/
/**
* Sample code: Get an incident relation.
@@ -3962,7 +1157,7 @@ public final class IncidentRelationsGetSamples {
"myWorkspace",
"afbd324f-6c48-459c-8710-8d1e1cd03812",
"4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014",
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -3970,12 +1165,10 @@ public final class IncidentRelationsGetSamples {
### IncidentRelations_List
```java
-import com.azure.core.util.Context;
-
/** Samples for IncidentRelations List. */
public final class IncidentRelationsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/GetAllIncidentRelations.json
*/
/**
* Sample code: Get all incident relations.
@@ -3986,7 +1179,15 @@ public final class IncidentRelationsListSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidentRelations()
- .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE);
+ .list(
+ "myRg",
+ "myWorkspace",
+ "afbd324f-6c48-459c-8710-8d1e1cd03812",
+ null,
+ null,
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -4005,7 +1206,7 @@ import java.util.UUID;
/** Samples for Incidents CreateOrUpdate. */
public final class IncidentsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/CreateIncident.json
*/
/**
* Sample code: Creates or updates an incident.
@@ -4034,45 +1235,13 @@ public final class IncidentsCreateOrUpdateSamples {
}
```
-### Incidents_CreateTeam
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.TeamProperties;
-
-/** Samples for Incidents CreateTeam. */
-public final class IncidentsCreateTeamSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateTeam.json
- */
- /**
- * Sample code: Creates incident teams group.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsIncidentTeamsGroup(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .incidents()
- .createTeamWithResponse(
- "ambawolvese5resourcegroup",
- "AmbaE5WestCentralUS",
- "69a30280-6a4c-4aa7-9af0-5d63f335d600",
- new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"),
- Context.NONE);
- }
-}
-```
-
### Incidents_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for Incidents Delete. */
public final class IncidentsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/DeleteIncident.json
*/
/**
* Sample code: Delete an incident.
@@ -4082,7 +1251,8 @@ public final class IncidentsDeleteSamples {
public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidents()
- .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -4090,12 +1260,10 @@ public final class IncidentsDeleteSamples {
### Incidents_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Incidents Get. */
public final class IncidentsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetIncidentById.json
*/
/**
* Sample code: Get an incident.
@@ -4105,7 +1273,8 @@ public final class IncidentsGetSamples {
public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidents()
- .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE);
+ .getWithResponse(
+ "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE);
}
}
```
@@ -4113,12 +1282,10 @@ public final class IncidentsGetSamples {
### Incidents_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Incidents List. */
public final class IncidentsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetIncidents.json
*/
/**
* Sample code: Get all incidents.
@@ -4126,125 +1293,85 @@ public final class IncidentsListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE);
- }
-}
-```
-
-### Incidents_ListAlerts
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for Incidents ListAlerts. */
-public final class IncidentsListAlertsSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json
- */
- /**
- * Sample code: Get all incident alerts.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllIncidentAlerts(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .incidents()
- .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE);
- }
-}
-```
-
-### Incidents_ListBookmarks
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for Incidents ListBookmarks. */
-public final class IncidentsListBookmarksSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json
- */
- /**
- * Sample code: Get all incident bookmarks.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllIncidentBookmarks(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidents()
- .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE);
+ .list(
+ "myRg",
+ "myWorkspace",
+ null,
+ "properties/createdTimeUtc desc",
+ 1,
+ null,
+ com.azure.core.util.Context.NONE);
}
}
```
-### Incidents_ListEntities
+### Incidents_ListAlerts
```java
-import com.azure.core.util.Context;
-
-/** Samples for Incidents ListEntities. */
-public final class IncidentsListEntitiesSamples {
+/** Samples for Incidents ListAlerts. */
+public final class IncidentsListAlertsSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentAlerts.json
*/
/**
- * Sample code: Gets all incident related entities.
+ * Sample code: Get all incident alerts.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getsAllIncidentRelatedEntities(
+ public static void getAllIncidentAlerts(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidents()
- .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE);
+ .listAlertsWithResponse(
+ "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE);
}
}
```
-### Incidents_RunPlaybook
+### Incidents_ListBookmarks
```java
-import com.azure.core.util.Context;
-
-/** Samples for Incidents RunPlaybook. */
-public final class IncidentsRunPlaybookSamples {
+/** Samples for Incidents ListBookmarks. */
+public final class IncidentsListBookmarksSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentBookmarks.json
*/
/**
- * Sample code: Incidents_RunPlaybook.
+ * Sample code: Get all incident bookmarks.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void incidentsRunPlaybook(
+ public static void getAllIncidentBookmarks(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.incidents()
- .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE);
+ .listBookmarksWithResponse(
+ "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE);
}
}
```
-### IpGeodata_Get
+### Incidents_ListEntities
```java
-import com.azure.core.util.Context;
-
-/** Samples for IpGeodata Get. */
-public final class IpGeodataGetSamples {
+/** Samples for Incidents ListEntities. */
+public final class IncidentsListEntitiesSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentEntities.json
*/
/**
- * Sample code: Get geodata for a single IP address.
+ * Sample code: Gets all incident related entities.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void getGeodataForASingleIPAddress(
+ public static void getsAllIncidentRelatedEntities(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE);
+ manager
+ .incidents()
+ .listEntitiesWithResponse(
+ "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE);
}
}
```
@@ -4252,7 +1379,6 @@ public final class IpGeodataGetSamples {
### Metadata_Create
```java
-import com.azure.resourcemanager.securityinsights.models.Kind;
import com.azure.resourcemanager.securityinsights.models.MetadataAuthor;
import com.azure.resourcemanager.securityinsights.models.MetadataCategories;
import com.azure.resourcemanager.securityinsights.models.MetadataDependencies;
@@ -4267,7 +1393,7 @@ import java.util.Arrays;
/** Samples for Metadata Create. */
public final class MetadataCreateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PutMetadata.json
*/
/**
* Sample code: Create/update full metadata.
@@ -4284,7 +1410,7 @@ public final class MetadataCreateSamples {
.withParentId(
"/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName")
.withVersion("1.0.0.0")
- .withKind(Kind.ANALYTICS_RULE)
+ .withKind("AnalyticsRule")
.withSource(
new MetadataSource()
.withKind(SourceKind.SOLUTION)
@@ -4310,22 +1436,22 @@ public final class MetadataCreateSamples {
.asList(
new MetadataDependencies()
.withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756")
- .withKind(Kind.DATA_CONNECTOR)
+ .withKind("DataConnector")
.withName("Microsoft Defender for Endpoint"),
new MetadataDependencies()
.withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d")
- .withKind(Kind.DATA_CONNECTOR),
+ .withKind("DataConnector"),
new MetadataDependencies()
.withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593")
- .withKind(Kind.DATA_CONNECTOR)
+ .withKind("DataConnector")
.withVersion("2.0"))),
new MetadataDependencies()
.withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab")
- .withKind(Kind.PLAYBOOK)
+ .withKind("Playbook")
.withVersion("1.0"),
new MetadataDependencies()
.withContentId("21ba424a-9438-4444-953a-7059539a7a1b")
- .withKind(Kind.PARSER))))
+ .withKind("Parser"))))
.withCategories(
new MetadataCategories()
.withDomains(Arrays.asList("Application", "Security – Insider Threat"))
@@ -4343,7 +1469,7 @@ public final class MetadataCreateSamples {
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PutMetadataMinimal.json
*/
/**
* Sample code: Create/update minimal metadata.
@@ -4359,7 +1485,7 @@ public final class MetadataCreateSamples {
.withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0")
.withParentId(
"/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName")
- .withKind(Kind.ANALYTICS_RULE)
+ .withKind("AnalyticsRule")
.create();
}
}
@@ -4368,12 +1494,10 @@ public final class MetadataCreateSamples {
### Metadata_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for Metadata Delete. */
public final class MetadataDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/DeleteMetadata.json
*/
/**
* Sample code: Delete metadata.
@@ -4381,7 +1505,7 @@ public final class MetadataDeleteSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE);
+ manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE);
}
}
```
@@ -4389,12 +1513,10 @@ public final class MetadataDeleteSamples {
### Metadata_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Metadata Get. */
public final class MetadataGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetMetadata.json
*/
/**
* Sample code: Get single metadata by name.
@@ -4403,7 +1525,7 @@ public final class MetadataGetSamples {
*/
public static void getSingleMetadataByName(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE);
+ manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE);
}
}
```
@@ -4411,12 +1533,10 @@ public final class MetadataGetSamples {
### Metadata_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Metadata List. */
public final class MetadataListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetAllMetadata.json
*/
/**
* Sample code: Get all metadata.
@@ -4424,11 +1544,11 @@ public final class MetadataListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE);
+ manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetAllMetadataOData.json
*/
/**
* Sample code: Get all metadata with OData filter/orderby/skip/top.
@@ -4437,7 +1557,7 @@ public final class MetadataListSamples {
*/
public static void getAllMetadataWithODataFilterOrderbySkipTop(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE);
+ manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -4445,14 +1565,13 @@ public final class MetadataListSamples {
### Metadata_Update
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.MetadataAuthor;
import com.azure.resourcemanager.securityinsights.models.MetadataModel;
/** Samples for Metadata Update. */
public final class MetadataUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PatchMetadata.json
*/
/**
* Sample code: Update metadata.
@@ -4461,7 +1580,10 @@ public final class MetadataUpdateSamples {
*/
public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
MetadataModel resource =
- manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue();
+ manager
+ .metadatas()
+ .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE)
+ .getValue();
resource
.update()
.withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com"))
@@ -4470,84 +1592,13 @@ public final class MetadataUpdateSamples {
}
```
-### OfficeConsents_Delete
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for OfficeConsents Delete. */
-public final class OfficeConsentsDeleteSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json
- */
- /**
- * Sample code: Delete an office consent.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteAnOfficeConsent(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .officeConsents()
- .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE);
- }
-}
-```
-
-### OfficeConsents_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for OfficeConsents Get. */
-public final class OfficeConsentsGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json
- */
- /**
- * Sample code: Get an office consent.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .officeConsents()
- .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE);
- }
-}
-```
-
-### OfficeConsents_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for OfficeConsents List. */
-public final class OfficeConsentsListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json
- */
- /**
- * Sample code: Get all office consents.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllOfficeConsents(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.officeConsents().list("myRg", "myWorkspace", Context.NONE);
- }
-}
-```
-
### Operations_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/operations/ListOperations.json
*/
/**
* Sample code: Get all operations.
@@ -4555,101 +1606,7 @@ public final class OperationsListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.operations().list(Context.NONE);
- }
-}
-```
-
-### ProductSettings_Delete
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for ProductSettings Delete. */
-public final class ProductSettingsDeleteSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json
- */
- /**
- * Sample code: Delete EyesOn settings.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteEyesOnSettings(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE);
- }
-}
-```
-
-### ProductSettings_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for ProductSettings Get. */
-public final class ProductSettingsGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json
- */
- /**
- * Sample code: Get EyesOn settings.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE);
- }
-}
-```
-
-### ProductSettings_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for ProductSettings List. */
-public final class ProductSettingsListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json
- */
- /**
- * Sample code: Get all settings.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE);
- }
-}
-```
-
-### ProductSettings_Update
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.EyesOn;
-
-/** Samples for ProductSettings Update. */
-public final class ProductSettingsUpdateSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json
- */
- /**
- * Sample code: Update EyesOn settings.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void updateEyesOnSettings(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .productSettings()
- .updateWithResponse(
- "myRg",
- "myWorkspace",
- "EyesOn",
- new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""),
- Context.NONE);
+ manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
@@ -4658,7 +1615,6 @@ public final class ProductSettingsUpdateSamples {
```java
import com.azure.core.management.serializer.SerializerFactory;
-import com.azure.core.util.Context;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings;
import com.azure.resourcemanager.securityinsights.models.AttackTactic;
@@ -4672,7 +1628,7 @@ import java.util.UUID;
/** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */
public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json
*/
/**
* Sample code: Creates or updates a Anomaly Security ML Analytics Settings.
@@ -4726,7 +1682,7 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples {
.withIsDefaultSettings(true)
.withAnomalySettingsVersion(0)
.withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -4734,12 +1690,10 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples {
### SecurityMLAnalyticsSettings_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for SecurityMLAnalyticsSettings Delete. */
public final class SecurityMLAnalyticsSettingsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json
*/
/**
* Sample code: Delete a Security ML Analytics Settings.
@@ -4750,7 +1704,8 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.securityMLAnalyticsSettings()
- .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE);
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", com.azure.core.util.Context.NONE);
}
}
```
@@ -4758,12 +1713,10 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples {
### SecurityMLAnalyticsSettings_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for SecurityMLAnalyticsSettings Get. */
public final class SecurityMLAnalyticsSettingsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json
*/
/**
* Sample code: Get a Anomaly Security ML Analytics Settings.
@@ -4774,7 +1727,7 @@ public final class SecurityMLAnalyticsSettingsGetSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.securityMLAnalyticsSettings()
- .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE);
+ .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", com.azure.core.util.Context.NONE);
}
}
```
@@ -4782,12 +1735,10 @@ public final class SecurityMLAnalyticsSettingsGetSamples {
### SecurityMLAnalyticsSettings_List
```java
-import com.azure.core.util.Context;
-
/** Samples for SecurityMLAnalyticsSettings List. */
public final class SecurityMLAnalyticsSettingsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json
*/
/**
* Sample code: Get all Security ML Analytics Settings.
@@ -4796,7 +1747,7 @@ public final class SecurityMLAnalyticsSettingsListSamples {
*/
public static void getAllSecurityMLAnalyticsSettings(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE);
+ manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -4807,7 +1758,7 @@ public final class SecurityMLAnalyticsSettingsListSamples {
/** Samples for SentinelOnboardingStates Create. */
public final class SentinelOnboardingStatesCreateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/CreateSentinelOnboardingState.json
*/
/**
* Sample code: Create Sentinel onboarding state.
@@ -4829,12 +1780,10 @@ public final class SentinelOnboardingStatesCreateSamples {
### SentinelOnboardingStates_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for SentinelOnboardingStates Delete. */
public final class SentinelOnboardingStatesDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/DeleteSentinelOnboardingState.json
*/
/**
* Sample code: Delete Sentinel onboarding state.
@@ -4843,7 +1792,9 @@ public final class SentinelOnboardingStatesDeleteSamples {
*/
public static void deleteSentinelOnboardingState(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE);
+ manager
+ .sentinelOnboardingStates()
+ .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE);
}
}
```
@@ -4851,12 +1802,10 @@ public final class SentinelOnboardingStatesDeleteSamples {
### SentinelOnboardingStates_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for SentinelOnboardingStates Get. */
public final class SentinelOnboardingStatesGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/GetSentinelOnboardingState.json
*/
/**
* Sample code: Get Sentinel onboarding state.
@@ -4865,7 +1814,9 @@ public final class SentinelOnboardingStatesGetSamples {
*/
public static void getSentinelOnboardingState(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE);
+ manager
+ .sentinelOnboardingStates()
+ .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE);
}
}
```
@@ -4873,12 +1824,10 @@ public final class SentinelOnboardingStatesGetSamples {
### SentinelOnboardingStates_List
```java
-import com.azure.core.util.Context;
-
/** Samples for SentinelOnboardingStates List. */
public final class SentinelOnboardingStatesListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/GetAllSentinelOnboardingStates.json
*/
/**
* Sample code: Get all Sentinel onboarding states.
@@ -4887,147 +1836,7 @@ public final class SentinelOnboardingStatesListSamples {
*/
public static void getAllSentinelOnboardingStates(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE);
- }
-}
-```
-
-### SourceControl_ListRepositories
-
-```java
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.securityinsights.models.RepoType;
-
-/** Samples for SourceControl ListRepositories. */
-public final class SourceControlListRepositoriesSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json
- */
- /**
- * Sample code: Get repository list.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE);
- }
-}
-```
-
-### SourceControlsOperation_Create
-
-```java
-import com.azure.resourcemanager.securityinsights.models.ContentPathMap;
-import com.azure.resourcemanager.securityinsights.models.ContentType;
-import com.azure.resourcemanager.securityinsights.models.RepoType;
-import com.azure.resourcemanager.securityinsights.models.Repository;
-import java.util.Arrays;
-
-/** Samples for SourceControlsOperation Create. */
-public final class SourceControlsOperationCreateSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json
- */
- /**
- * Sample code: Creates a source control.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void createsASourceControl(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .sourceControlsOperations()
- .define("789e0c1f-4a3d-43ad-809c-e713b677b04a")
- .withExistingWorkspace("myRg", "myWorkspace")
- .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
- .withDisplayName("My Source Control")
- .withDescription("This is a source control")
- .withRepoType(RepoType.GITHUB)
- .withContentTypes(Arrays.asList(ContentType.fromString("AnalyticRules"), ContentType.WORKBOOK))
- .withRepository(
- new Repository()
- .withUrl("https://github.com/user/repo")
- .withBranch("master")
- .withDisplayUrl("https://github.com/user/repo")
- .withPathMapping(
- Arrays
- .asList(
- new ContentPathMap()
- .withContentType(ContentType.fromString("AnalyticRules"))
- .withPath("path/to/rules"),
- new ContentPathMap()
- .withContentType(ContentType.WORKBOOK)
- .withPath("path/to/workbooks"))))
- .create();
- }
-}
-```
-
-### SourceControlsOperation_Delete
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for SourceControlsOperation Delete. */
-public final class SourceControlsOperationDeleteSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json
- */
- /**
- * Sample code: Delete a source control.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void deleteASourceControl(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .sourceControlsOperations()
- .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE);
- }
-}
-```
-
-### SourceControlsOperation_Get
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for SourceControlsOperation Get. */
-public final class SourceControlsOperationGetSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json
- */
- /**
- * Sample code: Get a source control.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager
- .sourceControlsOperations()
- .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE);
- }
-}
-```
-
-### SourceControlsOperation_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for SourceControlsOperation List. */
-public final class SourceControlsOperationListSamples {
- /*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json
- */
- /**
- * Sample code: Get all source controls.
- *
- * @param manager Entry point to SecurityInsightsManager.
- */
- public static void getAllSourceControls(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE);
+ manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -5035,14 +1844,13 @@ public final class SourceControlsOperationListSamples {
### ThreatIntelligenceIndicator_AppendTags
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags;
import java.util.Arrays;
/** Samples for ThreatIntelligenceIndicator AppendTags. */
public final class ThreatIntelligenceIndicatorAppendTagsSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/AppendTagsThreatIntelligence.json
*/
/**
* Sample code: Append tags to a threat intelligence indicator.
@@ -5058,7 +1866,7 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples {
"myWorkspace",
"d9cd6f0b-96b9-3984-17cd-a779d1e15a93",
new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5066,14 +1874,13 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples {
### ThreatIntelligenceIndicator_Create
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel;
import java.util.Arrays;
/** Samples for ThreatIntelligenceIndicator Create. */
public final class ThreatIntelligenceIndicatorCreateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/UpdateThreatIntelligence.json
*/
/**
* Sample code: Update a threat Intelligence indicator.
@@ -5106,7 +1913,7 @@ public final class ThreatIntelligenceIndicatorCreateSamples {
.withValidFrom("2020-04-15T17:44:00.114052Z")
.withValidUntil("")
.withModified(""),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5114,14 +1921,13 @@ public final class ThreatIntelligenceIndicatorCreateSamples {
### ThreatIntelligenceIndicator_CreateIndicator
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel;
import java.util.Arrays;
/** Samples for ThreatIntelligenceIndicator CreateIndicator. */
public final class ThreatIntelligenceIndicatorCreateIndicatorSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/CreateThreatIntelligence.json
*/
/**
* Sample code: Create a new Threat Intelligence.
@@ -5150,10 +1956,10 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples {
.withRevoked(false)
.withConfidence(78)
.withThreatTypes(Arrays.asList("compromised"))
- .withValidFrom("2021-09-15T17:44:00.114052Z")
+ .withValidFrom("2020-04-15T17:44:00.114052Z")
.withValidUntil("")
.withModified(""),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5161,12 +1967,10 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples {
### ThreatIntelligenceIndicator_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for ThreatIntelligenceIndicator Delete. */
public final class ThreatIntelligenceIndicatorDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/DeleteThreatIntelligence.json
*/
/**
* Sample code: Delete a threat intelligence indicator.
@@ -5177,7 +1981,8 @@ public final class ThreatIntelligenceIndicatorDeleteSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.threatIntelligenceIndicators()
- .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE);
+ .deleteWithResponse(
+ "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", com.azure.core.util.Context.NONE);
}
}
```
@@ -5185,12 +1990,10 @@ public final class ThreatIntelligenceIndicatorDeleteSamples {
### ThreatIntelligenceIndicator_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for ThreatIntelligenceIndicator Get. */
public final class ThreatIntelligenceIndicatorGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/GetThreatIntelligenceById.json
*/
/**
* Sample code: View a threat intelligence indicator by name.
@@ -5201,7 +2004,8 @@ public final class ThreatIntelligenceIndicatorGetSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.threatIntelligenceIndicators()
- .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE);
+ .getWithResponse(
+ "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE);
}
}
```
@@ -5209,16 +2013,15 @@ public final class ThreatIntelligenceIndicatorGetSamples {
### ThreatIntelligenceIndicator_QueryIndicators
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria;
-import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum;
+import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingOrder;
import java.util.Arrays;
/** Samples for ThreatIntelligenceIndicator QueryIndicators. */
public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/QueryThreatIntelligence.json
*/
/**
* Sample code: Query threat intelligence indicators as per filtering criteria.
@@ -5236,16 +2039,16 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples {
.withPageSize(100)
.withMinConfidence(25)
.withMaxConfidence(80)
- .withMinValidUntil("2021-04-05T17:44:00.114052Z")
- .withMaxValidUntil("2021-04-25T17:44:00.114052Z")
+ .withMinValidUntil("2020-04-05T17:44:00.114052Z")
+ .withMaxValidUntil("2020-04-25T17:44:00.114052Z")
.withSortBy(
Arrays
.asList(
new ThreatIntelligenceSortingCriteria()
- .withItemKey("lastUpdatedTimeUtc")
- .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING)))
+ .withItemKey("fakeTokenPlaceholder")
+ .withSortOrder(ThreatIntelligenceSortingOrder.DESCENDING)))
.withSources(Arrays.asList("Azure Sentinel")),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5253,14 +2056,13 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples {
### ThreatIntelligenceIndicator_ReplaceTags
```java
-import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel;
import java.util.Arrays;
/** Samples for ThreatIntelligenceIndicator ReplaceTags. */
public final class ThreatIntelligenceIndicatorReplaceTagsSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/ReplaceTagsThreatIntelligence.json
*/
/**
* Sample code: Replace tags to a Threat Intelligence.
@@ -5278,7 +2080,7 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples {
new ThreatIntelligenceIndicatorModel()
.withEtag("\"0000262c-0000-0800-0000-5e9767060000\"")
.withThreatIntelligenceTags(Arrays.asList("patching tags")),
- Context.NONE);
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5286,12 +2088,10 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples {
### ThreatIntelligenceIndicatorMetrics_List
```java
-import com.azure.core.util.Context;
-
/** Samples for ThreatIntelligenceIndicatorMetrics List. */
public final class ThreatIntelligenceIndicatorMetricsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/CollectThreatIntelligenceMetrics.json
*/
/**
* Sample code: Get threat intelligence indicators metrics.
@@ -5300,7 +2100,9 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples {
*/
public static void getThreatIntelligenceIndicatorsMetrics(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE);
+ manager
+ .threatIntelligenceIndicatorMetrics()
+ .listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE);
}
}
```
@@ -5308,12 +2110,10 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples {
### ThreatIntelligenceIndicatorsOperation_List
```java
-import com.azure.core.util.Context;
-
/** Samples for ThreatIntelligenceIndicatorsOperation List. */
public final class ThreatIntelligenceIndicatorsOperationListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/GetThreatIntelligence.json
*/
/**
* Sample code: Get all threat intelligence indicators.
@@ -5324,7 +2124,7 @@ public final class ThreatIntelligenceIndicatorsOperationListSamples {
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.threatIntelligenceIndicatorsOperations()
- .list("myRg", "myWorkspace", null, null, null, null, Context.NONE);
+ .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -5332,68 +2132,51 @@ public final class ThreatIntelligenceIndicatorsOperationListSamples {
### WatchlistItems_CreateOrUpdate
```java
-import java.util.HashMap;
-import java.util.Map;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerEncoding;
+import java.io.IOException;
/** Samples for WatchlistItems CreateOrUpdate. */
public final class WatchlistItemsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/CreateWatchlistItem.json
*/
/**
- * Sample code: Creates or updates a watchlist item.
+ * Sample code: Create or update a watchlist item.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void createsOrUpdatesAWatchlistItem(
- com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
+ public static void createOrUpdateAWatchlistItem(
+ com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException {
manager
.watchlistItems()
.define("82ba292c-dc97-4dfc-969d-d4dd9e666842")
.withExistingWatchlist("myRg", "myWorkspace", "highValueAsset")
.withEtag("0300bf09-0000-0000-0000-5c37296e0000")
.withItemsKeyValue(
- mapOf(
- "Business tier",
- "10.0.2.0/24",
- "Data tier",
- "10.0.2.0/24",
- "Gateway subnet",
- "10.0.255.224/27",
- "Private DMZ in",
- "10.0.0.0/27",
- "Public DMZ out",
- "10.0.0.96/27",
- "Web Tier",
- "10.0.1.0/24"))
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize(
+ "{\"Business tier\":\"10.0.2.0/24\",\"Data tier\":\"10.0.2.0/24\",\"Gateway"
+ + " subnet\":\"10.0.255.224/27\",\"Private DMZ in\":\"10.0.0.0/27\",\"Public DMZ"
+ + " out\":\"10.0.0.96/27\",\"Web Tier\":\"10.0.1.0/24\"}",
+ Object.class,
+ SerializerEncoding.JSON))
.create();
}
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
}
```
### WatchlistItems_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for WatchlistItems Delete. */
public final class WatchlistItemsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/DeleteWatchlistItem.json
*/
/**
- * Sample code: Delete a watchlist Item.
+ * Sample code: Delete a watchlist item.
*
* @param manager Entry point to SecurityInsightsManager.
*/
@@ -5402,7 +2185,11 @@ public final class WatchlistItemsDeleteSamples {
manager
.watchlistItems()
.deleteWithResponse(
- "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE);
+ "myRg",
+ "myWorkspace",
+ "highValueAsset",
+ "4008512e-1d30-48b2-9ee2-d3612ed9d3ea",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5410,12 +2197,10 @@ public final class WatchlistItemsDeleteSamples {
### WatchlistItems_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for WatchlistItems Get. */
public final class WatchlistItemsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistItemById.json
*/
/**
* Sample code: Get a watchlist item.
@@ -5426,7 +2211,11 @@ public final class WatchlistItemsGetSamples {
manager
.watchlistItems()
.getWithResponse(
- "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE);
+ "myRg",
+ "myWorkspace",
+ "highValueAsset",
+ "3f8901fe-63d9-4875-9ad5-9fb3b8105797",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -5434,12 +2223,10 @@ public final class WatchlistItemsGetSamples {
### WatchlistItems_List
```java
-import com.azure.core.util.Context;
-
/** Samples for WatchlistItems List. */
public final class WatchlistItemsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistItems.json
*/
/**
* Sample code: Get all watchlist Items.
@@ -5448,7 +2235,7 @@ public final class WatchlistItemsListSamples {
*/
public static void getAllWatchlistItems(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE);
+ manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -5456,19 +2243,19 @@ public final class WatchlistItemsListSamples {
### Watchlists_CreateOrUpdate
```java
-import com.azure.resourcemanager.securityinsights.models.SourceType;
+import com.azure.resourcemanager.securityinsights.models.Source;
/** Samples for Watchlists CreateOrUpdate. */
public final class WatchlistsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/CreateWatchlist.json
*/
/**
- * Sample code: Creates or updates a watchlist and bulk creates watchlist items.
+ * Sample code: Create or update a watchlist.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems(
+ public static void createOrUpdateAWatchlist(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.watchlists()
@@ -5477,25 +2264,21 @@ public final class WatchlistsCreateOrUpdateSamples {
.withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
.withDisplayName("High Value Assets Watchlist")
.withProvider("Microsoft")
- .withSource("watchlist.csv")
- .withSourceType(SourceType.LOCAL_FILE)
+ .withSource(Source.LOCAL_FILE)
.withDescription("Watchlist from CSV content")
- .withNumberOfLinesToSkip(1)
- .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2")
.withItemsSearchKey("header1")
- .withContentType("text/csv")
.create();
}
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json
*/
/**
- * Sample code: Creates or updates a watchlist.
+ * Sample code: Create or update a watchlist and bulk creates watchlist items.
*
* @param manager Entry point to SecurityInsightsManager.
*/
- public static void createsOrUpdatesAWatchlist(
+ public static void createOrUpdateAWatchlistAndBulkCreatesWatchlistItems(
com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
manager
.watchlists()
@@ -5504,10 +2287,12 @@ public final class WatchlistsCreateOrUpdateSamples {
.withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"")
.withDisplayName("High Value Assets Watchlist")
.withProvider("Microsoft")
- .withSource("watchlist.csv")
- .withSourceType(SourceType.LOCAL_FILE)
+ .withSource(Source.LOCAL_FILE)
.withDescription("Watchlist from CSV content")
+ .withNumberOfLinesToSkip(1)
+ .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2")
.withItemsSearchKey("header1")
+ .withContentType("text/csv")
.create();
}
}
@@ -5516,12 +2301,10 @@ public final class WatchlistsCreateOrUpdateSamples {
### Watchlists_Delete
```java
-import com.azure.core.util.Context;
-
/** Samples for Watchlists Delete. */
public final class WatchlistsDeleteSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/DeleteWatchlist.json
*/
/**
* Sample code: Delete a watchlist.
@@ -5529,7 +2312,9 @@ public final class WatchlistsDeleteSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE);
+ manager
+ .watchlists()
+ .deleteWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE);
}
}
```
@@ -5537,12 +2322,10 @@ public final class WatchlistsDeleteSamples {
### Watchlists_Get
```java
-import com.azure.core.util.Context;
-
/** Samples for Watchlists Get. */
public final class WatchlistsGetSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistByAlias.json
*/
/**
* Sample code: Get a watchlist.
@@ -5550,7 +2333,7 @@ public final class WatchlistsGetSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE);
+ manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE);
}
}
```
@@ -5558,12 +2341,10 @@ public final class WatchlistsGetSamples {
### Watchlists_List
```java
-import com.azure.core.util.Context;
-
/** Samples for Watchlists List. */
public final class WatchlistsListSamples {
/*
- * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json
+ * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlists.json
*/
/**
* Sample code: Get all watchlists.
@@ -5571,7 +2352,7 @@ public final class WatchlistsListSamples {
* @param manager Entry point to SecurityInsightsManager.
*/
public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) {
- manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE);
+ manager.watchlists().list("myRg", "myWorkspace", null, com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml
index 8bc8a35a859bc..20d204962873a 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml
@@ -13,7 +13,7 @@
jar
Microsoft Azure SDK for SecurityInsights Management
- This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09.
+ This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-2023-02.
https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java
index 6868ca4ea727a..8611db4425a71 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java
@@ -28,32 +28,16 @@
import com.azure.resourcemanager.securityinsights.implementation.AlertRuleTemplatesImpl;
import com.azure.resourcemanager.securityinsights.implementation.AlertRulesImpl;
import com.azure.resourcemanager.securityinsights.implementation.AutomationRulesImpl;
-import com.azure.resourcemanager.securityinsights.implementation.BookmarkOperationsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.BookmarkRelationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.BookmarksImpl;
-import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsCheckRequirementsOperationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.DomainWhoisImpl;
-import com.azure.resourcemanager.securityinsights.implementation.EntitiesGetTimelinesImpl;
-import com.azure.resourcemanager.securityinsights.implementation.EntitiesImpl;
-import com.azure.resourcemanager.securityinsights.implementation.EntitiesRelationsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.EntityQueriesImpl;
-import com.azure.resourcemanager.securityinsights.implementation.EntityQueryTemplatesImpl;
-import com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.FileImportsImpl;
import com.azure.resourcemanager.securityinsights.implementation.IncidentCommentsImpl;
import com.azure.resourcemanager.securityinsights.implementation.IncidentRelationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.IncidentsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.IpGeodatasImpl;
import com.azure.resourcemanager.securityinsights.implementation.MetadatasImpl;
-import com.azure.resourcemanager.securityinsights.implementation.OfficeConsentsImpl;
import com.azure.resourcemanager.securityinsights.implementation.OperationsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.ProductSettingsImpl;
import com.azure.resourcemanager.securityinsights.implementation.SecurityInsightsBuilder;
import com.azure.resourcemanager.securityinsights.implementation.SecurityMLAnalyticsSettingsImpl;
import com.azure.resourcemanager.securityinsights.implementation.SentinelOnboardingStatesImpl;
-import com.azure.resourcemanager.securityinsights.implementation.SourceControlsImpl;
-import com.azure.resourcemanager.securityinsights.implementation.SourceControlsOperationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorMetricsImpl;
import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsImpl;
import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsOperationsImpl;
@@ -63,31 +47,15 @@
import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates;
import com.azure.resourcemanager.securityinsights.models.AlertRules;
import com.azure.resourcemanager.securityinsights.models.AutomationRules;
-import com.azure.resourcemanager.securityinsights.models.BookmarkOperations;
-import com.azure.resourcemanager.securityinsights.models.BookmarkRelations;
import com.azure.resourcemanager.securityinsights.models.Bookmarks;
import com.azure.resourcemanager.securityinsights.models.DataConnectors;
-import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations;
-import com.azure.resourcemanager.securityinsights.models.DomainWhois;
-import com.azure.resourcemanager.securityinsights.models.Entities;
-import com.azure.resourcemanager.securityinsights.models.EntitiesGetTimelines;
-import com.azure.resourcemanager.securityinsights.models.EntitiesRelations;
-import com.azure.resourcemanager.securityinsights.models.EntityQueries;
-import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates;
-import com.azure.resourcemanager.securityinsights.models.EntityRelations;
-import com.azure.resourcemanager.securityinsights.models.FileImports;
import com.azure.resourcemanager.securityinsights.models.IncidentComments;
import com.azure.resourcemanager.securityinsights.models.IncidentRelations;
import com.azure.resourcemanager.securityinsights.models.Incidents;
-import com.azure.resourcemanager.securityinsights.models.IpGeodatas;
import com.azure.resourcemanager.securityinsights.models.Metadatas;
-import com.azure.resourcemanager.securityinsights.models.OfficeConsents;
import com.azure.resourcemanager.securityinsights.models.Operations;
-import com.azure.resourcemanager.securityinsights.models.ProductSettings;
import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettings;
import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates;
-import com.azure.resourcemanager.securityinsights.models.SourceControls;
-import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations;
@@ -113,31 +81,11 @@ public final class SecurityInsightsManager {
private AutomationRules automationRules;
- private Incidents incidents;
-
private Bookmarks bookmarks;
- private BookmarkRelations bookmarkRelations;
-
- private BookmarkOperations bookmarkOperations;
-
- private IpGeodatas ipGeodatas;
-
- private DomainWhois domainWhois;
-
- private Entities entities;
-
- private EntitiesGetTimelines entitiesGetTimelines;
-
- private EntitiesRelations entitiesRelations;
-
- private EntityRelations entityRelations;
-
- private EntityQueries entityQueries;
-
- private EntityQueryTemplates entityQueryTemplates;
+ private DataConnectors dataConnectors;
- private FileImports fileImports;
+ private Incidents incidents;
private IncidentComments incidentComments;
@@ -145,18 +93,10 @@ public final class SecurityInsightsManager {
private Metadatas metadatas;
- private OfficeConsents officeConsents;
-
private SentinelOnboardingStates sentinelOnboardingStates;
private SecurityMLAnalyticsSettings securityMLAnalyticsSettings;
- private ProductSettings productSettings;
-
- private SourceControls sourceControls;
-
- private SourceControlsOperations sourceControlsOperations;
-
private ThreatIntelligenceIndicators threatIntelligenceIndicators;
private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations;
@@ -167,10 +107,6 @@ public final class SecurityInsightsManager {
private WatchlistItems watchlistItems;
- private DataConnectors dataConnectors;
-
- private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations;
-
private Operations operations;
private final SecurityInsights clientObject;
@@ -338,7 +274,7 @@ public SecurityInsightsManager authenticate(TokenCredential credential, AzurePro
.append("-")
.append("com.azure.resourcemanager.securityinsights")
.append("/")
- .append("1.0.0-beta.4");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -443,18 +379,6 @@ public AutomationRules automationRules() {
return automationRules;
}
- /**
- * Gets the resource collection API of Incidents. It manages Incident.
- *
- * @return Resource collection API of Incidents.
- */
- public Incidents incidents() {
- if (this.incidents == null) {
- this.incidents = new IncidentsImpl(clientObject.getIncidents(), this);
- }
- return incidents;
- }
-
/**
* Gets the resource collection API of Bookmarks. It manages Bookmark.
*
@@ -468,135 +392,27 @@ public Bookmarks bookmarks() {
}
/**
- * Gets the resource collection API of BookmarkRelations. It manages Relation.
- *
- * @return Resource collection API of BookmarkRelations.
- */
- public BookmarkRelations bookmarkRelations() {
- if (this.bookmarkRelations == null) {
- this.bookmarkRelations = new BookmarkRelationsImpl(clientObject.getBookmarkRelations(), this);
- }
- return bookmarkRelations;
- }
-
- /**
- * Gets the resource collection API of BookmarkOperations.
- *
- * @return Resource collection API of BookmarkOperations.
- */
- public BookmarkOperations bookmarkOperations() {
- if (this.bookmarkOperations == null) {
- this.bookmarkOperations = new BookmarkOperationsImpl(clientObject.getBookmarkOperations(), this);
- }
- return bookmarkOperations;
- }
-
- /**
- * Gets the resource collection API of IpGeodatas.
- *
- * @return Resource collection API of IpGeodatas.
- */
- public IpGeodatas ipGeodatas() {
- if (this.ipGeodatas == null) {
- this.ipGeodatas = new IpGeodatasImpl(clientObject.getIpGeodatas(), this);
- }
- return ipGeodatas;
- }
-
- /**
- * Gets the resource collection API of DomainWhois.
- *
- * @return Resource collection API of DomainWhois.
- */
- public DomainWhois domainWhois() {
- if (this.domainWhois == null) {
- this.domainWhois = new DomainWhoisImpl(clientObject.getDomainWhois(), this);
- }
- return domainWhois;
- }
-
- /**
- * Gets the resource collection API of Entities.
- *
- * @return Resource collection API of Entities.
- */
- public Entities entities() {
- if (this.entities == null) {
- this.entities = new EntitiesImpl(clientObject.getEntities(), this);
- }
- return entities;
- }
-
- /**
- * Gets the resource collection API of EntitiesGetTimelines.
- *
- * @return Resource collection API of EntitiesGetTimelines.
- */
- public EntitiesGetTimelines entitiesGetTimelines() {
- if (this.entitiesGetTimelines == null) {
- this.entitiesGetTimelines = new EntitiesGetTimelinesImpl(clientObject.getEntitiesGetTimelines(), this);
- }
- return entitiesGetTimelines;
- }
-
- /**
- * Gets the resource collection API of EntitiesRelations.
- *
- * @return Resource collection API of EntitiesRelations.
- */
- public EntitiesRelations entitiesRelations() {
- if (this.entitiesRelations == null) {
- this.entitiesRelations = new EntitiesRelationsImpl(clientObject.getEntitiesRelations(), this);
- }
- return entitiesRelations;
- }
-
- /**
- * Gets the resource collection API of EntityRelations.
- *
- * @return Resource collection API of EntityRelations.
- */
- public EntityRelations entityRelations() {
- if (this.entityRelations == null) {
- this.entityRelations = new EntityRelationsImpl(clientObject.getEntityRelations(), this);
- }
- return entityRelations;
- }
-
- /**
- * Gets the resource collection API of EntityQueries.
- *
- * @return Resource collection API of EntityQueries.
- */
- public EntityQueries entityQueries() {
- if (this.entityQueries == null) {
- this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this);
- }
- return entityQueries;
- }
-
- /**
- * Gets the resource collection API of EntityQueryTemplates.
+ * Gets the resource collection API of DataConnectors.
*
- * @return Resource collection API of EntityQueryTemplates.
+ * @return Resource collection API of DataConnectors.
*/
- public EntityQueryTemplates entityQueryTemplates() {
- if (this.entityQueryTemplates == null) {
- this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this);
+ public DataConnectors dataConnectors() {
+ if (this.dataConnectors == null) {
+ this.dataConnectors = new DataConnectorsImpl(clientObject.getDataConnectors(), this);
}
- return entityQueryTemplates;
+ return dataConnectors;
}
/**
- * Gets the resource collection API of FileImports. It manages FileImport.
+ * Gets the resource collection API of Incidents. It manages Incident.
*
- * @return Resource collection API of FileImports.
+ * @return Resource collection API of Incidents.
*/
- public FileImports fileImports() {
- if (this.fileImports == null) {
- this.fileImports = new FileImportsImpl(clientObject.getFileImports(), this);
+ public Incidents incidents() {
+ if (this.incidents == null) {
+ this.incidents = new IncidentsImpl(clientObject.getIncidents(), this);
}
- return fileImports;
+ return incidents;
}
/**
@@ -612,7 +428,7 @@ public IncidentComments incidentComments() {
}
/**
- * Gets the resource collection API of IncidentRelations.
+ * Gets the resource collection API of IncidentRelations. It manages Relation.
*
* @return Resource collection API of IncidentRelations.
*/
@@ -635,18 +451,6 @@ public Metadatas metadatas() {
return metadatas;
}
- /**
- * Gets the resource collection API of OfficeConsents.
- *
- * @return Resource collection API of OfficeConsents.
- */
- public OfficeConsents officeConsents() {
- if (this.officeConsents == null) {
- this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this);
- }
- return officeConsents;
- }
-
/**
* Gets the resource collection API of SentinelOnboardingStates. It manages SentinelOnboardingState.
*
@@ -673,43 +477,6 @@ public SecurityMLAnalyticsSettings securityMLAnalyticsSettings() {
return securityMLAnalyticsSettings;
}
- /**
- * Gets the resource collection API of ProductSettings.
- *
- * @return Resource collection API of ProductSettings.
- */
- public ProductSettings productSettings() {
- if (this.productSettings == null) {
- this.productSettings = new ProductSettingsImpl(clientObject.getProductSettings(), this);
- }
- return productSettings;
- }
-
- /**
- * Gets the resource collection API of SourceControls.
- *
- * @return Resource collection API of SourceControls.
- */
- public SourceControls sourceControls() {
- if (this.sourceControls == null) {
- this.sourceControls = new SourceControlsImpl(clientObject.getSourceControls(), this);
- }
- return sourceControls;
- }
-
- /**
- * Gets the resource collection API of SourceControlsOperations. It manages SourceControl.
- *
- * @return Resource collection API of SourceControlsOperations.
- */
- public SourceControlsOperations sourceControlsOperations() {
- if (this.sourceControlsOperations == null) {
- this.sourceControlsOperations =
- new SourceControlsOperationsImpl(clientObject.getSourceControlsOperations(), this);
- }
- return sourceControlsOperations;
- }
-
/**
* Gets the resource collection API of ThreatIntelligenceIndicators.
*
@@ -774,32 +541,6 @@ public WatchlistItems watchlistItems() {
return watchlistItems;
}
- /**
- * Gets the resource collection API of DataConnectors.
- *
- * @return Resource collection API of DataConnectors.
- */
- public DataConnectors dataConnectors() {
- if (this.dataConnectors == null) {
- this.dataConnectors = new DataConnectorsImpl(clientObject.getDataConnectors(), this);
- }
- return dataConnectors;
- }
-
- /**
- * Gets the resource collection API of DataConnectorsCheckRequirementsOperations.
- *
- * @return Resource collection API of DataConnectorsCheckRequirementsOperations.
- */
- public DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations() {
- if (this.dataConnectorsCheckRequirementsOperations == null) {
- this.dataConnectorsCheckRequirementsOperations =
- new DataConnectorsCheckRequirementsOperationsImpl(
- clientObject.getDataConnectorsCheckRequirementsOperations(), this);
- }
- return dataConnectorsCheckRequirementsOperations;
- }
-
/**
* Gets the resource collection API of Operations.
*
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java
index 1679ca2138ad0..18cfd50a24315 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java
@@ -44,21 +44,6 @@ public interface ActionsClient {
PagedIterable listByAlertRule(
String resourceGroupName, String workspaceName, String ruleId, Context context);
- /**
- * Gets the action of alert rule.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param ruleId Alert rule ID.
- * @param actionId Action ID.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the action of alert rule.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId);
-
/**
* Gets the action of alert rule.
*
@@ -77,21 +62,19 @@ Response getWithResponse(
String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context);
/**
- * Creates or updates the action of alert rule.
+ * Gets the action of alert rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
* @param actionId Action ID.
- * @param action The action.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return action for alert rule.
+ * @return the action of alert rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ActionResponseInner createOrUpdate(
- String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action);
+ ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId);
/**
* Creates or updates the action of alert rule.
@@ -117,18 +100,21 @@ Response createOrUpdateWithResponse(
Context context);
/**
- * Delete the action of alert rule.
+ * Creates or updates the action of alert rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
* @param actionId Action ID.
+ * @param action The action.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return action for alert rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId);
+ ActionResponseInner createOrUpdate(
+ String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action);
/**
* Delete the action of alert rule.
@@ -146,4 +132,18 @@ Response createOrUpdateWithResponse(
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context);
+
+ /**
+ * Delete the action of alert rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param ruleId Alert rule ID.
+ * @param actionId Action ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId);
}
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java
index c568ee0f23feb..1747732b0446d 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java
@@ -46,13 +46,15 @@ public interface AlertRuleTemplatesClient {
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param alertRuleTemplateId Alert rule template ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the alert rule template.
+ * @return the alert rule template along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId);
+ Response getWithResponse(
+ String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context);
/**
* Gets the alert rule template.
@@ -60,13 +62,11 @@ public interface AlertRuleTemplatesClient {
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param alertRuleTemplateId Alert rule template ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the alert rule template along with {@link Response}.
+ * @return the alert rule template.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context);
+ AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId);
}
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java
index d40ca296e5fc6..c77a3e9fa2fa2 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java
@@ -46,13 +46,15 @@ public interface AlertRulesClient {
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the alert rule.
+ * @return the alert rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId);
+ Response getWithResponse(
+ String resourceGroupName, String workspaceName, String ruleId, Context context);
/**
* Gets the alert rule.
@@ -60,15 +62,13 @@ public interface AlertRulesClient {
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the alert rule along with {@link Response}.
+ * @return the alert rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String workspaceName, String ruleId, Context context);
+ AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId);
/**
* Creates or updates the alert rule.
@@ -77,14 +77,15 @@ Response getWithResponse(
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
* @param alertRule The alert rule.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return alert rule.
+ * @return alert rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AlertRuleInner createOrUpdate(
- String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule);
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context);
/**
* Creates or updates the alert rule.
@@ -93,15 +94,14 @@ AlertRuleInner createOrUpdate(
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
* @param alertRule The alert rule.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return alert rule along with {@link Response}.
+ * @return alert rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context);
+ AlertRuleInner createOrUpdate(
+ String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule);
/**
* Delete the alert rule.
@@ -109,12 +109,14 @@ Response createOrUpdateWithResponse(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String workspaceName, String ruleId);
+ Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context);
/**
* Delete the alert rule.
@@ -122,12 +124,10 @@ Response createOrUpdateWithResponse(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param ruleId Alert rule ID.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context);
+ void delete(String resourceGroupName, String workspaceName, String ruleId);
}
diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java
index 8bdfc546a32d2..1e448c15a2037 100644
--- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java
+++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java
@@ -13,20 +13,6 @@
/** An instance of this class provides access to all the operations defined in AutomationRulesClient. */
public interface AutomationRulesClient {
- /**
- * Gets the automation rule.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param workspaceName The name of the workspace.
- * @param automationRuleId Automation rule ID.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the automation rule.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId);
-
/**
* Gets the automation rule.
*
@@ -44,7 +30,7 @@ Response getWithResponse(
String resourceGroupName, String workspaceName, String automationRuleId, Context context);
/**
- * Creates or updates the automation rule.
+ * Gets the automation rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
@@ -52,10 +38,10 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the automation rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId);
+ AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId);
/**
* Creates or updates the automation rule.
@@ -79,7 +65,7 @@ Response createOrUpdateWithResponse(
Context context);
/**
- * Delete the automation rule.
+ * Creates or updates the automation rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
@@ -87,10 +73,10 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return any object.
+ * @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Object delete(String resourceGroupName, String workspaceName, String automationRuleId);
+ AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId);
/**
* Delete the automation rule.
@@ -108,6 +94,20 @@ Response createOrUpdateWithResponse(
Response