diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/CHANGELOG.md b/sdk/resourcemanager/securityinsights/armsecurityinsights/CHANGELOG.md index 52c043d1131d..0025852a7882 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/CHANGELOG.md +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/CHANGELOG.md @@ -883,6 +883,35 @@ - New field `AzureAsyncOperation` in struct `WatchlistsClientDeleteResponse` +## 2.0.0-beta.2 (2022-06-10) +### Features Added + +- New const `DeviceImportanceNormal` +- New const `DeviceImportanceLow` +- New const `DeviceImportanceHigh` +- New const `EntityKindNic` +- New const `DeviceImportanceUnknown` +- New const `EntityTypeNic` +- New function `PossibleDeviceImportanceValues() []DeviceImportance` +- New function `*NicEntity.GetEntity() *Entity` +- New struct `NicEntity` +- New struct `NicEntityProperties` +- New field `DataCollectionRuleImmutableID` in struct `DataConnectorConnectBody` +- New field `DataCollectionEndpoint` in struct `DataConnectorConnectBody` +- New field `OutputStream` in struct `DataConnectorConnectBody` +- New field `Zone` in struct `IoTDeviceEntityProperties` +- New field `IsAuthorized` in struct `IoTDeviceEntityProperties` +- New field `PurdueLayer` in struct `IoTDeviceEntityProperties` +- New field `IsProgramming` in struct `IoTDeviceEntityProperties` +- New field `Importance` in struct `IoTDeviceEntityProperties` +- New field `DeviceSubType` in struct `IoTDeviceEntityProperties` +- New field `Owners` in struct `IoTDeviceEntityProperties` +- New field `IsScanner` in struct `IoTDeviceEntityProperties` +- New field `Site` in struct `IoTDeviceEntityProperties` +- New field `Sensor` in struct `IoTDeviceEntityProperties` +- New field `NicEntityIDs` in struct `IoTDeviceEntityProperties` + + ## 1.0.0 (2022-05-17) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/autorest.md b/sdk/resourcemanager/securityinsights/armsecurityinsights/autorest.md index 44cd857de62a..2a422113d782 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/autorest.md +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/autorest.md @@ -5,10 +5,10 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/792db17291c758b2bfdbbc0d35d0e2f5b5a1bd05/specification/securityinsights/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/792db17291c758b2bfdbbc0d35d0e2f5b5a1bd05/specification/securityinsights/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/securityinsights/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/securityinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.1 +module-version: 2.0.0-beta.2 modelerfour: lenient-model-deduplication: true ``` \ No newline at end of file diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/go.mod b/sdk/resourcemanager/securityinsights/armsecurityinsights/go.mod index e546832e2d20..c2bee9338b45 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/go.mod +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/ar go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/go.sum b/sdk/resourcemanager/securityinsights/armsecurityinsights/go.sum index ed5b814680ee..3f874a3bc5a6 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/go.sum +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/go.sum @@ -1,33 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_actions_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_actions_client_test.go deleted file mode 100644 index 20a8109b9748..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_actions_client_test.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/actions/GetAllActionsByAlertRule.json -func ExampleActionsClient_NewListByAlertRulePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewActionsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByAlertRulePager("myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/actions/GetActionOfAlertRuleById.json -func ExampleActionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewActionsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "912bec42-cb66-4c03-ac63-1761b6898c3e", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/actions/CreateActionOfAlertRule.json -func ExampleActionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewActionsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "912bec42-cb66-4c03-ac63-1761b6898c3e", - armsecurityinsights.ActionRequest{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Properties: &armsecurityinsights.ActionRequestProperties{ - LogicAppResourceID: to.Ptr("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/MyAlerts"), - TriggerURI: to.Ptr("https://prod-31.northcentralus.logic.azure.com:443/workflows/cd3765391efd48549fd7681ded1d48d7/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=signature"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/actions/DeleteActionOfAlertRule.json -func ExampleActionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewActionsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "912bec42-cb66-4c03-ac63-1761b6898c3e", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_alertrules_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_alertrules_client_test.go deleted file mode 100644 index 82d6e34a4474..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_alertrules_client_test.go +++ /dev/null @@ -1,346 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/alertRules/GetAllAlertRules.json -func ExampleAlertRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAlertRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/alertRules/GetFusionAlertRule.json -func ExampleAlertRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAlertRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "myFirstFusionRule", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json -func ExampleAlertRulesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAlertRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "myFirstFusionRule", - &armsecurityinsights.FusionAlertRule{ - Etag: to.Ptr("3d00c3ca-0000-0100-0000-5d42d5010000"), - Kind: to.Ptr(armsecurityinsights.AlertRuleKindFusion), - Properties: &armsecurityinsights.FusionAlertRuleProperties{ - AlertRuleTemplateName: to.Ptr("f71aba3d-28fb-450b-b192-4e76a83015c8"), - Enabled: to.Ptr(true), - SourceSettings: []*armsecurityinsights.FusionSourceSettings{ - { - Enabled: to.Ptr(true), - SourceName: to.Ptr("Anomalies"), - }, - { - Enabled: to.Ptr(true), - SourceName: to.Ptr("Alert providers"), - SourceSubTypes: []*armsecurityinsights.FusionSourceSubTypeSetting{ - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Azure Active Directory Identity Protection"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Azure Defender"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Azure Defender for IoT"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Microsoft 365 Defender"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Microsoft Cloud App Security"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Microsoft Defender for Endpoint"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Microsoft Defender for Identity"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Microsoft Defender for Office 365"), - }, - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{ - Filters: []*armsecurityinsights.FusionSubTypeSeverityFiltersItem{ - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityHigh), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityMedium), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityLow), - }, - { - Enabled: to.Ptr(true), - Severity: to.Ptr(armsecurityinsights.AlertSeverityInformational), - }}, - }, - SourceSubTypeName: to.Ptr("Azure Sentinel scheduled analytics rules"), - }}, - }, - { - Enabled: to.Ptr(true), - SourceName: to.Ptr("Raw logs from other sources"), - SourceSubTypes: []*armsecurityinsights.FusionSourceSubTypeSetting{ - { - Enabled: to.Ptr(true), - SeverityFilters: &armsecurityinsights.FusionSubTypeSeverityFilter{}, - SourceSubTypeName: to.Ptr("Palo Alto Networks"), - }}, - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/alertRules/DeleteAlertRule.json -func ExampleAlertRulesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAlertRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_alertruletemplates_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_alertruletemplates_client_test.go deleted file mode 100644 index 03ffb29caeed..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_alertruletemplates_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json -func ExampleAlertRuleTemplatesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAlertRuleTemplatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json -func ExampleAlertRuleTemplatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAlertRuleTemplatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "65360bb0-8986-4ade-a89d-af3cf44d28aa", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_automationrules_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_automationrules_client_test.go deleted file mode 100644 index 6aa9f5db644d..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_automationrules_client_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/automationRules/AutomationRules_Get.json -func ExampleAutomationRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAutomationRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json -func ExampleAutomationRulesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAutomationRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - &armsecurityinsights.AutomationRulesClientCreateOrUpdateOptions{AutomationRuleToUpsert: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/automationRules/AutomationRules_Delete.json -func ExampleAutomationRulesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAutomationRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Delete(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/automationRules/AutomationRules_List.json -func ExampleAutomationRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewAutomationRulesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmark_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmark_client_test.go deleted file mode 100644 index 4c18b78b5c46..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmark_client_test.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/expand/PostExpandBookmark.json -func ExampleBookmarkClient_Expand() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarkClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Expand(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - armsecurityinsights.BookmarkExpandParameters{ - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-24T17:21:00.000Z"); return t }()), - ExpansionID: to.Ptr("27f76e63-c41b-480f-bb18-12ad2e011d49"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-25T17:21:00.000Z"); return t }()), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmarkrelations_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmarkrelations_client_test.go deleted file mode 100644 index 710b324e2bec..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmarkrelations_client_test.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json -func ExampleBookmarkRelationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarkRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - &armsecurityinsights.BookmarkRelationsClientListOptions{Filter: nil, - Orderby: nil, - Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json -func ExampleBookmarkRelationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarkRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json -func ExampleBookmarkRelationsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarkRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - armsecurityinsights.Relation{ - Properties: &armsecurityinsights.RelationProperties{ - RelatedResourceID: to.Ptr("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/incidents/afbd324f-6c48-459c-8710-8d1e1cd03812"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json -func ExampleBookmarkRelationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarkRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmarks_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmarks_client_test.go deleted file mode 100644 index d16a6d19e55d..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_bookmarks_client_test.go +++ /dev/null @@ -1,146 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/GetBookmarks.json -func ExampleBookmarksClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarksClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/GetBookmarkById.json -func ExampleBookmarksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarksClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/CreateBookmark.json -func ExampleBookmarksClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarksClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - armsecurityinsights.Bookmark{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Properties: &armsecurityinsights.BookmarkProperties{ - Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-01T13:15:30Z"); return t }()), - CreatedBy: &armsecurityinsights.UserInfo{ - ObjectID: to.Ptr("2046feea-040d-4a46-9e2b-91c2941bfa70"), - }, - DisplayName: to.Ptr("My bookmark"), - EntityMappings: []*armsecurityinsights.BookmarkEntityMappings{ - { - EntityType: to.Ptr("Account"), - FieldMappings: []*armsecurityinsights.EntityFieldMapping{ - { - Identifier: to.Ptr("Fullname"), - Value: to.Ptr("johndoe@microsoft.com"), - }}, - }}, - Labels: []*string{ - to.Ptr("Tag1"), - to.Ptr("Tag2")}, - Notes: to.Ptr("Found a suspicious activity"), - Query: to.Ptr("SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)"), - QueryResult: to.Ptr("Security Event query result"), - Tactics: []*armsecurityinsights.AttackTactic{ - to.Ptr(armsecurityinsights.AttackTacticExecution)}, - Techniques: []*string{ - to.Ptr("T1609")}, - Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-01T13:15:30Z"); return t }()), - UpdatedBy: &armsecurityinsights.UserInfo{ - ObjectID: to.Ptr("2046feea-040d-4a46-9e2b-91c2941bfa70"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/bookmarks/DeleteBookmark.json -func ExampleBookmarksClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewBookmarksClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_dataconnectors_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_dataconnectors_client_test.go deleted file mode 100644 index a847b5c2a268..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_dataconnectors_client_test.go +++ /dev/null @@ -1,270 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/GetDataConnectors.json -func ExampleDataConnectorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/GetAPIPolling.json -func ExampleDataConnectorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/CreateAPIPolling.json -func ExampleDataConnectorsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - &armsecurityinsights.CodelessAPIPollingDataConnector{ - Kind: to.Ptr(armsecurityinsights.DataConnectorKindAPIPolling), - Properties: &armsecurityinsights.APIPollingParameters{ - ConnectorUIConfig: &armsecurityinsights.CodelessUIConnectorConfigProperties{ - Availability: &armsecurityinsights.Availability{ - IsPreview: to.Ptr(true), - Status: to.Ptr[int32](1), - }, - ConnectivityCriteria: []*armsecurityinsights.CodelessUIConnectorConfigPropertiesConnectivityCriteriaItem{ - { - Type: to.Ptr(armsecurityinsights.ConnectivityType("SentinelKindsV2")), - Value: []*string{}, - }}, - DataTypes: []*armsecurityinsights.CodelessUIConnectorConfigPropertiesDataTypesItem{ - { - Name: to.Ptr("{{graphQueriesTableName}}"), - LastDataReceivedQuery: to.Ptr("{{graphQueriesTableName}}\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"), - }}, - DescriptionMarkdown: to.Ptr("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."), - GraphQueries: []*armsecurityinsights.CodelessUIConnectorConfigPropertiesGraphQueriesItem{ - { - BaseQuery: to.Ptr("{{graphQueriesTableName}}"), - Legend: to.Ptr("GitHub audit log events"), - MetricName: to.Ptr("Total events received"), - }}, - GraphQueriesTableName: to.Ptr("GitHubAuditLogPolling_CL"), - InstructionSteps: []*armsecurityinsights.CodelessUIConnectorConfigPropertiesInstructionStepsItem{ - { - Description: to.Ptr("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"), - Instructions: []*armsecurityinsights.InstructionStepsInstructionsItem{ - { - Type: to.Ptr(armsecurityinsights.SettingType("APIKey")), - Parameters: map[string]interface{}{ - "enable": "true", - "userRequestPlaceHoldersInput": []interface{}{ - map[string]interface{}{ - "displayText": "Organization Name", - "placeHolderName": "{{placeHolder1}}", - "placeHolderValue": "", - "requestObjectKey": "apiEndpoint", - }, - }, - }, - }}, - Title: to.Ptr("Connect GitHub Enterprise Audit Log to Azure Sentinel"), - }}, - Permissions: &armsecurityinsights.Permissions{ - Customs: []*armsecurityinsights.PermissionsCustomsItem{ - { - Name: to.Ptr("GitHub API personal token Key"), - Description: to.Ptr("You need access to GitHub personal token, the key should have 'admin:org' scope"), - }}, - ResourceProvider: []*armsecurityinsights.PermissionsResourceProviderItem{ - { - PermissionsDisplayText: to.Ptr("read and write permissions are required."), - Provider: to.Ptr(armsecurityinsights.ProviderNameMicrosoftOperationalInsightsWorkspaces), - ProviderDisplayName: to.Ptr("Workspace"), - RequiredPermissions: &armsecurityinsights.RequiredPermissions{ - Delete: to.Ptr(true), - Read: to.Ptr(true), - Write: to.Ptr(true), - }, - Scope: to.Ptr(armsecurityinsights.PermissionProviderScopeWorkspace), - }}, - }, - Publisher: to.Ptr("GitHub"), - SampleQueries: []*armsecurityinsights.CodelessUIConnectorConfigPropertiesSampleQueriesItem{ - { - Description: to.Ptr("All logs"), - Query: to.Ptr("{{graphQueriesTableName}}\n | take 10 "), - }}, - Title: to.Ptr("GitHub Enterprise Audit Log"), - }, - PollingConfig: &armsecurityinsights.CodelessConnectorPollingConfigProperties{ - Auth: &armsecurityinsights.CodelessConnectorPollingAuthProperties{ - APIKeyIdentifier: to.Ptr("token"), - APIKeyName: to.Ptr("Authorization"), - AuthType: to.Ptr("APIKey"), - }, - Paging: &armsecurityinsights.CodelessConnectorPollingPagingProperties{ - PageSizeParaName: to.Ptr("per_page"), - PagingType: to.Ptr("LinkHeader"), - }, - Response: &armsecurityinsights.CodelessConnectorPollingResponseProperties{ - EventsJSONPaths: []*string{ - to.Ptr("$")}, - }, - Request: &armsecurityinsights.CodelessConnectorPollingRequestProperties{ - APIEndpoint: to.Ptr("https://api.github.com/organizations/{{placeHolder1}}/audit-log"), - Headers: map[string]interface{}{ - "Accept": "application/json", - "User-Agent": "Scuba", - }, - HTTPMethod: to.Ptr("Get"), - QueryParameters: map[string]interface{}{ - "phrase": "created:{_QueryWindowStartTime}..{_QueryWindowEndTime}", - }, - QueryTimeFormat: to.Ptr("yyyy-MM-ddTHH:mm:ssZ"), - QueryWindowInMin: to.Ptr[int32](15), - RateLimitQPS: to.Ptr[int32](50), - RetryCount: to.Ptr[int32](2), - TimeoutInSeconds: to.Ptr[int32](60), - }, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/DeleteAPIPolling.json -func ExampleDataConnectorsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/ConnectAPIPolling.json -func ExampleDataConnectorsClient_Connect() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Connect(ctx, - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - armsecurityinsights.DataConnectorConnectBody{ - APIKey: to.Ptr("123456789"), - Kind: to.Ptr(armsecurityinsights.ConnectAuthKindAPIKey), - RequestConfigUserInputValues: []interface{}{ - map[string]interface{}{ - "displayText": "Organization Name", - "placeHolderName": "{{placeHolder1}}", - "placeHolderValue": "somePlaceHolderValue", - "requestObjectKey": "apiEndpoint", - }}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/DisconnectAPIPolling.json -func ExampleDataConnectorsClient_Disconnect() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Disconnect(ctx, - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_dataconnectorscheckrequirements_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_dataconnectorscheckrequirements_client_test.go deleted file mode 100644 index d9bd9bb6b934..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_dataconnectorscheckrequirements_client_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json -func ExampleDataConnectorsCheckRequirementsClient_Post() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDataConnectorsCheckRequirementsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Post(ctx, - "myRg", - "myWorkspace", - &armsecurityinsights.AADCheckRequirements{ - Kind: to.Ptr(armsecurityinsights.DataConnectorKindAzureActiveDirectory), - Properties: &armsecurityinsights.AADCheckRequirementsProperties{ - TenantID: to.Ptr("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_domainwhois_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_domainwhois_client_test.go deleted file mode 100644 index 5316fe5a5496..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_domainwhois_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/enrichment/GetWhoisByDomainName.json -func ExampleDomainWhoisClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewDomainWhoisClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "microsoft.com", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entities_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entities_client_test.go deleted file mode 100644 index 3cd96e9bcb65..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entities_client_test.go +++ /dev/null @@ -1,151 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/GetEntities.json -func ExampleEntitiesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/GetCloudApplicationEntityById.json -func ExampleEntitiesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/expand/PostExpandEntity.json -func ExampleEntitiesClient_Expand() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Expand(ctx, - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - armsecurityinsights.EntityExpandParameters{ - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T00:00:00.000Z"); return t }()), - ExpansionID: to.Ptr("a77992f3-25e9-4d01-99a4-5ff606cc410a"), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-25T00:00:00.000Z"); return t }()), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/GetQueries.json -func ExampleEntitiesClient_Queries() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Queries(ctx, - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - armsecurityinsights.EntityItemQueryKindInsight, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/insights/PostGetInsights.json -func ExampleEntitiesClient_GetInsights() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetInsights(ctx, - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - armsecurityinsights.EntityGetInsightsParameters{ - AddDefaultExtendedTimeRange: to.Ptr(false), - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T00:00:00.000Z"); return t }()), - InsightQueryIDs: []*string{ - to.Ptr("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4")}, - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-01T00:00:00.000Z"); return t }()), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entitiesgettimeline_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entitiesgettimeline_client_test.go deleted file mode 100644 index a6999843f7c2..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entitiesgettimeline_client_test.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/timeline/PostTimelineEntity.json -func ExampleEntitiesGetTimelineClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesGetTimelineClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - armsecurityinsights.EntityTimelineParameters{ - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T00:00:00.000Z"); return t }()), - NumberOfBucket: to.Ptr[int32](4), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-01T00:00:00.000Z"); return t }()), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entitiesrelations_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entitiesrelations_client_test.go deleted file mode 100644 index 671afc361056..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entitiesrelations_client_test.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/relations/GetAllEntityRelations.json -func ExampleEntitiesRelationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntitiesRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - &armsecurityinsights.EntitiesRelationsClientListOptions{Filter: nil, - Orderby: nil, - Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityqueries_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityqueries_client_test.go deleted file mode 100644 index d89d267cf986..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityqueries_client_test.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entityQueries/GetEntityQueries.json -func ExampleEntityQueriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityQueriesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - &armsecurityinsights.EntityQueriesClientListOptions{Kind: to.Ptr(armsecurityinsights.Enum13Expansion)}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entityQueries/GetActivityEntityQueryById.json -func ExampleEntityQueriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityQueriesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entityQueries/CreateEntityQueryActivity.json -func ExampleEntityQueriesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityQueriesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - &armsecurityinsights.ActivityCustomEntityQuery{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Kind: to.Ptr(armsecurityinsights.CustomEntityQueryKindActivity), - Properties: &armsecurityinsights.ActivityEntityQueriesProperties{ - Description: to.Ptr("Account deleted on host"), - Content: to.Ptr("On '{{Computer}}' the account '{{TargetAccount}}' was deleted by '{{AddedBy}}'"), - Enabled: to.Ptr(true), - EntitiesFilter: map[string][]*string{ - "Host_OsFamily": { - to.Ptr("Windows")}, - }, - InputEntityType: to.Ptr(armsecurityinsights.EntityTypeHost), - QueryDefinitions: &armsecurityinsights.ActivityEntityQueriesPropertiesQueryDefinitions{ - Query: to.Ptr("let GetAccountActions = (v_Host_Name:string, v_Host_NTDomain:string, v_Host_DnsDomain:string, v_Host_AzureID:string, v_Host_OMSAgentID:string){\nSecurityEvent\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(\nComputer has '@', tostring(split(Computer, '@')[0]),\nComputer has '\\\\', tostring(split(Computer, '\\\\')[1]),\nComputer has '.', tostring(split(Computer, '.')[0]),\nComputer\n)\n| extend Host_NTDomain = case(\nComputer has '\\\\', tostring(split(Computer, '\\\\')[0]), \nComputer has '.', tostring(split(Computer, '.')[-2]), \nComputer\n)\n| extend Host_DnsDomain = case(\nComputer has '\\\\', tostring(split(Computer, '\\\\')[0]), \nComputer has '.', strcat_array(array_slice(split(Computer,'.'),-2,-1),'.'), \nComputer\n)\n| where (Host_HostName =~ v_Host_Name and Host_NTDomain =~ v_Host_NTDomain) \nor (Host_HostName =~ v_Host_Name and Host_DnsDomain =~ v_Host_DnsDomain) \nor v_Host_AzureID =~ _ResourceId \nor 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};\nGetAccountActions('{{Host_HostName}}', '{{Host_NTDomain}}', '{{Host_DnsDomain}}', '{{Host_AzureID}}', '{{Host_OMSAgentID}}')\n \n| where EventID == 4726 "), - }, - RequiredInputFieldsSets: [][]*string{ - { - to.Ptr("Host_HostName"), - to.Ptr("Host_NTDomain")}, - { - to.Ptr("Host_HostName"), - to.Ptr("Host_DnsDomain")}, - { - to.Ptr("Host_AzureID")}, - { - to.Ptr("Host_OMSAgentID")}}, - Title: to.Ptr("An account was deleted on this host"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entityQueries/DeleteEntityQuery.json -func ExampleEntityQueriesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityQueriesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityquerytemplates_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityquerytemplates_client_test.go deleted file mode 100644 index 3be62acde0a2..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityquerytemplates_client_test.go +++ /dev/null @@ -1,67 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json -func ExampleEntityQueryTemplatesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityQueryTemplatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - &armsecurityinsights.EntityQueryTemplatesClientListOptions{Kind: to.Ptr(armsecurityinsights.Enum15Activity)}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json -func ExampleEntityQueryTemplatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityQueryTemplatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityrelations_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityrelations_client_test.go deleted file mode 100644 index aed367dd35d5..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_entityrelations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/entities/relations/GetEntityRelationByName.json -func ExampleEntityRelationsClient_GetRelation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewEntityRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetRelation(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidentcomments_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidentcomments_client_test.go deleted file mode 100644 index 355b3cb95986..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidentcomments_client_test.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/comments/GetAllIncidentComments.json -func ExampleIncidentCommentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentCommentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - &armsecurityinsights.IncidentCommentsClientListOptions{Filter: nil, - Orderby: nil, - Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/comments/GetIncidentCommentById.json -func ExampleIncidentCommentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentCommentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/comments/CreateIncidentComment.json -func ExampleIncidentCommentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentCommentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - armsecurityinsights.IncidentComment{ - Properties: &armsecurityinsights.IncidentCommentProperties{ - Message: to.Ptr("Some message"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/comments/DeleteIncidentComment.json -func ExampleIncidentCommentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentCommentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidentrelations_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidentrelations_client_test.go deleted file mode 100644 index ce6da0a4666b..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidentrelations_client_test.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/relations/GetAllIncidentRelations.json -func ExampleIncidentRelationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - &armsecurityinsights.IncidentRelationsClientListOptions{Filter: nil, - Orderby: nil, - Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/relations/GetIncidentRelationByName.json -func ExampleIncidentRelationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/relations/CreateIncidentRelation.json -func ExampleIncidentRelationsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - armsecurityinsights.Relation{ - Properties: &armsecurityinsights.RelationProperties{ - RelatedResourceID: to.Ptr("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/relations/DeleteIncidentRelation.json -func ExampleIncidentRelationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentRelationsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidents_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidents_client_test.go deleted file mode 100644 index 14b95b932d4a..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_incidents_client_test.go +++ /dev/null @@ -1,251 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json -func ExampleIncidentsClient_RunPlaybook() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.RunPlaybook(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ar4", - &armsecurityinsights.IncidentsClientRunPlaybookOptions{RequestBody: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/GetIncidents.json -func ExampleIncidentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - &armsecurityinsights.IncidentsClientListOptions{Filter: nil, - Orderby: to.Ptr("properties/createdTimeUtc desc"), - Top: to.Ptr[int32](1), - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/GetIncidentById.json -func ExampleIncidentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/CreateIncident.json -func ExampleIncidentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - armsecurityinsights.Incident{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Properties: &armsecurityinsights.IncidentProperties{ - Description: to.Ptr("This is a demo incident"), - Classification: to.Ptr(armsecurityinsights.IncidentClassificationFalsePositive), - ClassificationComment: to.Ptr("Not a malicious activity"), - ClassificationReason: to.Ptr(armsecurityinsights.IncidentClassificationReasonIncorrectAlertLogic), - FirstActivityTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-01T13:00:30Z"); return t }()), - LastActivityTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-01T13:05:30Z"); return t }()), - Owner: &armsecurityinsights.IncidentOwnerInfo{ - ObjectID: to.Ptr("2046feea-040d-4a46-9e2b-91c2941bfa70"), - }, - Severity: to.Ptr(armsecurityinsights.IncidentSeverityHigh), - Status: to.Ptr(armsecurityinsights.IncidentStatusClosed), - Title: to.Ptr("My incident"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/DeleteIncident.json -func ExampleIncidentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/CreateTeam.json -func ExampleIncidentsClient_CreateTeam() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("9023f5b5-df22-4313-8fbf-b4b75af8a6d9", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateTeam(ctx, - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", - "69a30280-6a4c-4aa7-9af0-5d63f335d600", - armsecurityinsights.TeamProperties{ - TeamDescription: to.Ptr("Team description"), - TeamName: to.Ptr("Team name"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/GetAllIncidentAlerts.json -func ExampleIncidentsClient_ListAlerts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListAlerts(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/GetAllIncidentBookmarks.json -func ExampleIncidentsClient_ListBookmarks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListBookmarks(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/incidents/entities/GetAllIncidentEntities.json -func ExampleIncidentsClient_ListEntities() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIncidentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListEntities(ctx, - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_ipgeodata_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_ipgeodata_client_test.go deleted file mode 100644 index b06584311c16..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_ipgeodata_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/enrichment/GetGeodataByIp.json -func ExampleIPGeodataClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewIPGeodataClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "1.2.3.4", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_metadata_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_metadata_client_test.go deleted file mode 100644 index 83dec5c120cd..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_metadata_client_test.go +++ /dev/null @@ -1,228 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/metadata/GetAllMetadataOData.json -func ExampleMetadataClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewMetadataClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - &armsecurityinsights.MetadataClientListOptions{Filter: nil, - Orderby: nil, - Top: nil, - Skip: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/metadata/GetMetadata.json -func ExampleMetadataClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewMetadataClient("2e1dc338-d04d-4443-b721-037eff4fdcac", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "metadataName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/metadata/DeleteMetadata.json -func ExampleMetadataClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewMetadataClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "metadataName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/metadata/PutMetadata.json -func ExampleMetadataClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewMetadataClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "myRg", - "myWorkspace", - "metadataName", - armsecurityinsights.MetadataModel{ - Properties: &armsecurityinsights.MetadataProperties{ - Author: &armsecurityinsights.MetadataAuthor{ - Name: to.Ptr("User Name"), - Email: to.Ptr("email@microsoft.com"), - }, - Categories: &armsecurityinsights.MetadataCategories{ - Domains: []*string{ - to.Ptr("Application"), - to.Ptr("Security – Insider Threat")}, - Verticals: []*string{ - to.Ptr("Healthcare")}, - }, - ContentID: to.Ptr("c00ee137-7475-47c8-9cce-ec6f0f1bedd0"), - ContentSchemaVersion: to.Ptr("2.0"), - CustomVersion: to.Ptr("1.0"), - Dependencies: &armsecurityinsights.MetadataDependencies{ - Criteria: []*armsecurityinsights.MetadataDependencies{ - { - Criteria: []*armsecurityinsights.MetadataDependencies{ - { - Name: to.Ptr("Microsoft Defender for Endpoint"), - ContentID: to.Ptr("045d06d0-ee72-4794-aba4-cf5646e4c756"), - Kind: to.Ptr(armsecurityinsights.KindDataConnector), - }, - { - ContentID: to.Ptr("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d"), - Kind: to.Ptr(armsecurityinsights.KindDataConnector), - }, - { - ContentID: to.Ptr("de4dca9b-eb37-47d6-a56f-b8b06b261593"), - Kind: to.Ptr(armsecurityinsights.KindDataConnector), - Version: to.Ptr("2.0"), - }}, - Operator: to.Ptr(armsecurityinsights.OperatorOR), - }, - { - ContentID: to.Ptr("31ee11cc-9989-4de8-b176-5e0ef5c4dbab"), - Kind: to.Ptr(armsecurityinsights.KindPlaybook), - Version: to.Ptr("1.0"), - }, - { - ContentID: to.Ptr("21ba424a-9438-4444-953a-7059539a7a1b"), - Kind: to.Ptr(armsecurityinsights.KindParser), - }}, - Operator: to.Ptr(armsecurityinsights.OperatorAND), - }, - FirstPublishDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2021-05-18"); return t }()), - Kind: to.Ptr(armsecurityinsights.KindAnalyticsRule), - LastPublishDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2021-05-18"); return t }()), - ParentID: to.Ptr("/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName"), - PreviewImages: []*string{ - to.Ptr("firstImage.png"), - to.Ptr("secondImage.jpeg")}, - PreviewImagesDark: []*string{ - to.Ptr("firstImageDark.png"), - to.Ptr("secondImageDark.jpeg")}, - Providers: []*string{ - to.Ptr("Amazon"), - to.Ptr("Microsoft")}, - Source: &armsecurityinsights.MetadataSource{ - Name: to.Ptr("Contoso Solution 1.0"), - Kind: to.Ptr(armsecurityinsights.SourceKindSolution), - SourceID: to.Ptr("b688a130-76f4-4a07-bf57-762222a3cadf"), - }, - Support: &armsecurityinsights.MetadataSupport{ - Name: to.Ptr("Microsoft"), - Email: to.Ptr("support@microsoft.com"), - Link: to.Ptr("https://support.microsoft.com/"), - Tier: to.Ptr(armsecurityinsights.SupportTierPartner), - }, - ThreatAnalysisTactics: []*string{ - to.Ptr("reconnaissance"), - to.Ptr("commandandcontrol")}, - ThreatAnalysisTechniques: []*string{ - to.Ptr("T1548"), - to.Ptr("T1548.001")}, - Version: to.Ptr("1.0.0.0"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/metadata/PatchMetadata.json -func ExampleMetadataClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewMetadataClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "myRg", - "myWorkspace", - "metadataName", - armsecurityinsights.MetadataPatch{ - Properties: &armsecurityinsights.MetadataPropertiesPatch{ - Author: &armsecurityinsights.MetadataAuthor{ - Name: to.Ptr("User Name"), - Email: to.Ptr("email@microsoft.com"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_officeconsents_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_officeconsents_client_test.go deleted file mode 100644 index bab894f1861a..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_officeconsents_client_test.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/officeConsents/GetOfficeConsents.json -func ExampleOfficeConsentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewOfficeConsentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/officeConsents/GetOfficeConsentsById.json -func ExampleOfficeConsentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewOfficeConsentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/officeConsents/DeleteOfficeConsents.json -func ExampleOfficeConsentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewOfficeConsentsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_operations_client_test.go deleted file mode 100644 index ab1e242a4e87..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_operations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/operations/ListOperations.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_productsettings_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_productsettings_client_test.go deleted file mode 100644 index ffb276d1759c..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_productsettings_client_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/settings/GetAllSettings.json -func ExampleProductSettingsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewProductSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "myRg", - "myWorkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/settings/GetEyesOnSetting.json -func ExampleProductSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewProductSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "EyesOn", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/settings/DeleteEyesOnSetting.json -func ExampleProductSettingsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewProductSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "EyesOn", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/settings/UpdateEyesOnSetting.json -func ExampleProductSettingsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewProductSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "myRg", - "myWorkspace", - "EyesOn", - &armsecurityinsights.EyesOn{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Kind: to.Ptr(armsecurityinsights.SettingKindEyesOn), - Properties: &armsecurityinsights.EyesOnSettingsProperties{}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_securitymlanalyticssettings_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_securitymlanalyticssettings_client_test.go deleted file mode 100644 index 2d4d7ea316d9..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_securitymlanalyticssettings_client_test.go +++ /dev/null @@ -1,181 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json -func ExampleSecurityMLAnalyticsSettingsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSecurityMLAnalyticsSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json -func ExampleSecurityMLAnalyticsSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSecurityMLAnalyticsSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "myFirstAnomalySettings", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json -func ExampleSecurityMLAnalyticsSettingsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSecurityMLAnalyticsSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "f209187f-1d17-4431-94af-c141bf5f23db", - &armsecurityinsights.AnomalySecurityMLAnalyticsSettings{ - Etag: to.Ptr("\"260090e2-0000-0d00-0000-5d6fb8670000\""), - Kind: to.Ptr(armsecurityinsights.SecurityMLAnalyticsSettingsKindAnomaly), - Properties: &armsecurityinsights.AnomalySecurityMLAnalyticsSettingsProperties{ - Description: to.Ptr("When account logs from a source region that has rarely been logged in from during the last 14 days, an anomaly is triggered."), - AnomalySettingsVersion: to.Ptr[int32](0), - AnomalyVersion: to.Ptr("1.0.5"), - CustomizableObservations: map[string]interface{}{ - "multiSelectObservations": nil, - "prioritizeExcludeObservations": nil, - "singleSelectObservations": []interface{}{ - map[string]interface{}{ - "name": "Device vendor", - "description": "Select device vendor of network connection logs from CommonSecurityLog", - "rerun": "RerunAlways", - "sequenceNumber": float64(1), - "supportedValues": []interface{}{ - "Palo Alto Networks", - "Fortinet", - "Check Point", - }, - "supportedValuesKql": nil, - "value": []interface{}{ - "Palo Alto Networks", - }, - "valuesKql": nil, - }, - }, - "singleValueObservations": nil, - "thresholdObservations": []interface{}{ - map[string]interface{}{ - "name": "Daily data transfer threshold in MB", - "description": "Suppress anomalies when daily data transfered (in MB) per hour is less than the chosen value", - "maximum": "100", - "minimum": "1", - "rerun": "RerunAlways", - "sequenceNumber": float64(1), - "value": "25", - }, - map[string]interface{}{ - "name": "Number of standard deviations", - "description": "Triggers anomalies when number of standard deviations is greater than the chosen value", - "maximum": "10", - "minimum": "2", - "rerun": "RerunAlways", - "sequenceNumber": float64(2), - "value": "3", - }, - }, - }, - DisplayName: to.Ptr("Login from unusual region"), - Enabled: to.Ptr(true), - Frequency: to.Ptr("PT1H"), - IsDefaultSettings: to.Ptr(true), - RequiredDataConnectors: []*armsecurityinsights.SecurityMLAnalyticsSettingsDataSource{ - { - ConnectorID: to.Ptr("AWS"), - DataTypes: []*string{ - to.Ptr("AWSCloudTrail")}, - }}, - SettingsDefinitionID: to.Ptr("f209187f-1d17-4431-94af-c141bf5f23db"), - SettingsStatus: to.Ptr(armsecurityinsights.SettingsStatusProduction), - Tactics: []*armsecurityinsights.AttackTactic{ - to.Ptr(armsecurityinsights.AttackTacticExfiltration), - to.Ptr(armsecurityinsights.AttackTacticCommandAndControl)}, - Techniques: []*string{ - to.Ptr("T1037"), - to.Ptr("T1021")}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json -func ExampleSecurityMLAnalyticsSettingsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSecurityMLAnalyticsSettingsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "f209187f-1d17-4431-94af-c141bf5f23db", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sentinelonboardingstates_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sentinelonboardingstates_client_test.go deleted file mode 100644 index 5968a2c62dd4..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sentinelonboardingstates_client_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json -func ExampleSentinelOnboardingStatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSentinelOnboardingStatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json -func ExampleSentinelOnboardingStatesClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSentinelOnboardingStatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "myRg", - "myWorkspace", - "default", - &armsecurityinsights.SentinelOnboardingStatesClientCreateOptions{SentinelOnboardingStateParameter: &armsecurityinsights.SentinelOnboardingState{ - Properties: &armsecurityinsights.SentinelOnboardingStateProperties{ - CustomerManagedKey: to.Ptr(false), - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json -func ExampleSentinelOnboardingStatesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSentinelOnboardingStatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json -func ExampleSentinelOnboardingStatesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSentinelOnboardingStatesClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "myRg", - "myWorkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sourcecontrol_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sourcecontrol_client_test.go deleted file mode 100644 index a8b480010653..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sourcecontrol_client_test.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/repositories/GetRepositories.json -func ExampleSourceControlClient_NewListRepositoriesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSourceControlClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListRepositoriesPager("myRg", - "myWorkspace", - armsecurityinsights.RepoTypeGithub, - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sourcecontrols_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sourcecontrols_client_test.go deleted file mode 100644 index 68a431066ba6..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_sourcecontrols_client_test.go +++ /dev/null @@ -1,136 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/sourcecontrols/GetSourceControls.json -func ExampleSourceControlsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSourceControlsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/sourcecontrols/GetSourceControlById.json -func ExampleSourceControlsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSourceControlsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "789e0c1f-4a3d-43ad-809c-e713b677b04a", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/sourcecontrols/DeleteSourceControl.json -func ExampleSourceControlsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSourceControlsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "789e0c1f-4a3d-43ad-809c-e713b677b04a", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/sourcecontrols/CreateSourceControl.json -func ExampleSourceControlsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewSourceControlsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "myRg", - "myWorkspace", - "789e0c1f-4a3d-43ad-809c-e713b677b04a", - armsecurityinsights.SourceControl{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Properties: &armsecurityinsights.SourceControlProperties{ - Description: to.Ptr("This is a source control"), - ContentTypes: []*armsecurityinsights.ContentType{ - to.Ptr(armsecurityinsights.ContentType("AnalyticRules")), - to.Ptr(armsecurityinsights.ContentTypeWorkbook)}, - DisplayName: to.Ptr("My Source Control"), - RepoType: to.Ptr(armsecurityinsights.RepoTypeGithub), - Repository: &armsecurityinsights.Repository{ - Branch: to.Ptr("master"), - DisplayURL: to.Ptr("https://github.com/user/repo"), - PathMapping: []*armsecurityinsights.ContentPathMap{ - { - Path: to.Ptr("path/to/rules"), - ContentType: to.Ptr(armsecurityinsights.ContentType("AnalyticRules")), - }, - { - Path: to.Ptr("path/to/workbooks"), - ContentType: to.Ptr(armsecurityinsights.ContentTypeWorkbook), - }}, - URL: to.Ptr("https://github.com/user/repo"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicator_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicator_client_test.go deleted file mode 100644 index b872e9634bb4..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicator_client_test.go +++ /dev/null @@ -1,252 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/CreateThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorClient_CreateIndicator() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateIndicator(ctx, - "myRg", - "myWorkspace", - armsecurityinsights.ThreatIntelligenceIndicatorModel{ - Kind: to.Ptr(armsecurityinsights.ThreatIntelligenceResourceKindEnumIndicator), - Properties: &armsecurityinsights.ThreatIntelligenceIndicatorProperties{ - Description: to.Ptr("debugging indicators"), - Confidence: to.Ptr[int32](78), - CreatedByRef: to.Ptr("contoso@contoso.com"), - DisplayName: to.Ptr("new schema"), - ExternalReferences: []*armsecurityinsights.ThreatIntelligenceExternalReference{}, - GranularMarkings: []*armsecurityinsights.ThreatIntelligenceGranularMarkingModel{}, - KillChainPhases: []*armsecurityinsights.ThreatIntelligenceKillChainPhase{}, - Labels: []*string{}, - Modified: to.Ptr(""), - Pattern: to.Ptr("[url:value = 'https://www.contoso.com']"), - PatternType: to.Ptr("url"), - Revoked: to.Ptr(false), - Source: to.Ptr("Azure Sentinel"), - ThreatIntelligenceTags: []*string{ - to.Ptr("new schema")}, - ThreatTypes: []*string{ - to.Ptr("compromised")}, - ValidFrom: to.Ptr("2021-09-15T17:44:00.114052Z"), - ValidUntil: to.Ptr(""), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json -func ExampleThreatIntelligenceIndicatorClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - armsecurityinsights.ThreatIntelligenceIndicatorModel{ - Kind: to.Ptr(armsecurityinsights.ThreatIntelligenceResourceKindEnumIndicator), - Properties: &armsecurityinsights.ThreatIntelligenceIndicatorProperties{ - Description: to.Ptr("debugging indicators"), - Confidence: to.Ptr[int32](78), - CreatedByRef: to.Ptr("contoso@contoso.com"), - DisplayName: to.Ptr("new schema"), - ExternalReferences: []*armsecurityinsights.ThreatIntelligenceExternalReference{}, - GranularMarkings: []*armsecurityinsights.ThreatIntelligenceGranularMarkingModel{}, - KillChainPhases: []*armsecurityinsights.ThreatIntelligenceKillChainPhase{}, - Labels: []*string{}, - Modified: to.Ptr(""), - Pattern: to.Ptr("[url:value = 'https://www.contoso.com']"), - PatternType: to.Ptr("url"), - Revoked: to.Ptr(false), - Source: to.Ptr("Azure Sentinel"), - ThreatIntelligenceTags: []*string{ - to.Ptr("new schema")}, - ThreatTypes: []*string{ - to.Ptr("compromised")}, - ValidFrom: to.Ptr("2020-04-15T17:44:00.114052Z"), - ValidUntil: to.Ptr(""), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/QueryThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorClient_NewQueryIndicatorsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewQueryIndicatorsPager("myRg", - "myWorkspace", - armsecurityinsights.ThreatIntelligenceFilteringCriteria{ - MaxConfidence: to.Ptr[int32](80), - MaxValidUntil: to.Ptr("2021-04-25T17:44:00.114052Z"), - MinConfidence: to.Ptr[int32](25), - MinValidUntil: to.Ptr("2021-04-05T17:44:00.114052Z"), - PageSize: to.Ptr[int32](100), - SortBy: []*armsecurityinsights.ThreatIntelligenceSortingCriteria{ - { - ItemKey: to.Ptr("lastUpdatedTimeUtc"), - SortOrder: to.Ptr(armsecurityinsights.ThreatIntelligenceSortingCriteriaEnumDescending), - }}, - Sources: []*string{ - to.Ptr("Azure Sentinel")}, - }, - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorClient_AppendTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.AppendTags(ctx, - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - armsecurityinsights.ThreatIntelligenceAppendTags{ - ThreatIntelligenceTags: []*string{ - to.Ptr("tag1"), - to.Ptr("tag2")}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorClient_ReplaceTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ReplaceTags(ctx, - "myRg", - "myWorkspace", - "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", - armsecurityinsights.ThreatIntelligenceIndicatorModel{ - Etag: to.Ptr("\"0000262c-0000-0800-0000-5e9767060000\""), - Kind: to.Ptr(armsecurityinsights.ThreatIntelligenceResourceKindEnumIndicator), - Properties: &armsecurityinsights.ThreatIntelligenceIndicatorProperties{ - ThreatIntelligenceTags: []*string{ - to.Ptr("patching tags")}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicatormetrics_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicatormetrics_client_test.go deleted file mode 100644 index 184e6ab508c5..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicatormetrics_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json -func ExampleThreatIntelligenceIndicatorMetricsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorMetricsClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "myRg", - "myWorkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicators_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicators_client_test.go deleted file mode 100644 index 6db79fef9034..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_threatintelligenceindicators_client_test.go +++ /dev/null @@ -1,47 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/threatintelligence/GetThreatIntelligence.json -func ExampleThreatIntelligenceIndicatorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewThreatIntelligenceIndicatorsClient("bd794837-4d29-4647-9105-6339bfdb4e6a", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - &armsecurityinsights.ThreatIntelligenceIndicatorsClientListOptions{Filter: nil, - Orderby: nil, - Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_watchlistitems_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_watchlistitems_client_test.go deleted file mode 100644 index 72521705556e..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_watchlistitems_client_test.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/GetWatchlistItems.json -func ExampleWatchlistItemsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistItemsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - "highValueAsset", - &armsecurityinsights.WatchlistItemsClientListOptions{SkipToken: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/GetWatchlistItemById.json -func ExampleWatchlistItemsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistItemsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "highValueAsset", - "3f8901fe-63d9-4875-9ad5-9fb3b8105797", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/DeleteWatchlistItem.json -func ExampleWatchlistItemsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistItemsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "highValueAsset", - "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/CreateWatchlistItem.json -func ExampleWatchlistItemsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistItemsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "highValueAsset", - "82ba292c-dc97-4dfc-969d-d4dd9e666842", - armsecurityinsights.WatchlistItem{ - Etag: to.Ptr("0300bf09-0000-0000-0000-5c37296e0000"), - Properties: &armsecurityinsights.WatchlistItemProperties{ - ItemsKeyValue: map[string]interface{}{ - "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", - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_watchlists_client_test.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_watchlists_client_test.go deleted file mode 100644 index 75e6db30d398..000000000000 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/ze_generated_example_watchlists_client_test.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsecurityinsights_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/GetWatchlists.json -func ExampleWatchlistsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRg", - "myWorkspace", - &armsecurityinsights.WatchlistsClientListOptions{SkipToken: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/GetWatchlistByAlias.json -func ExampleWatchlistsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRg", - "myWorkspace", - "highValueAsset", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/DeleteWatchlist.json -func ExampleWatchlistsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRg", - "myWorkspace", - "highValueAsset", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-05-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json -func ExampleWatchlistsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsecurityinsights.NewWatchlistsClient("d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRg", - "myWorkspace", - "highValueAsset", - armsecurityinsights.Watchlist{ - Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Properties: &armsecurityinsights.WatchlistProperties{ - Description: to.Ptr("Watchlist from CSV content"), - ContentType: to.Ptr("text/csv"), - DisplayName: to.Ptr("High Value Assets Watchlist"), - ItemsSearchKey: to.Ptr("header1"), - NumberOfLinesToSkip: to.Ptr[int32](1), - Provider: to.Ptr("Microsoft"), - RawContent: to.Ptr("This line will be skipped\nheader1,header2\nvalue1,value2"), - Source: to.Ptr("watchlist.csv"), - SourceType: to.Ptr(armsecurityinsights.SourceTypeLocalFile), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_actions_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_actions_client.go index 79e92a1ab3b7..af4357404b4b 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_actions_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_actions_client.go @@ -56,7 +56,7 @@ func NewActionsClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or updates the action of alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -106,7 +106,7 @@ func (client *ActionsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, action) @@ -123,7 +123,7 @@ func (client *ActionsClient) createOrUpdateHandleResponse(resp *http.Response) ( // Delete - Delete the action of alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -172,7 +172,7 @@ func (client *ActionsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ActionsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets the action of alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -229,7 +229,7 @@ func (client *ActionsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -246,7 +246,7 @@ func (client *ActionsClient) getHandleResponse(resp *http.Response) (ActionsClie // NewListByAlertRulePager - Gets all actions of alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -303,7 +303,7 @@ func (client *ActionsClient) listByAlertRuleCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertrules_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertrules_client.go index e4ce180ac651..4d423d328b57 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertrules_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertrules_client.go @@ -56,7 +56,7 @@ func NewAlertRulesClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Creates or updates the alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -102,7 +102,7 @@ func (client *AlertRulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, alertRule) @@ -119,7 +119,7 @@ func (client *AlertRulesClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete the alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -163,7 +163,7 @@ func (client *AlertRulesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +171,7 @@ func (client *AlertRulesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets the alert rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // ruleID - Alert rule ID @@ -215,7 +215,7 @@ func (client *AlertRulesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *AlertRulesClient) getHandleResponse(resp *http.Response) (AlertRul // NewListPager - Gets all alert rules. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - AlertRulesClientListOptions contains the optional parameters for the AlertRulesClient.List method. @@ -284,7 +284,7 @@ func (client *AlertRulesClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertruletemplates_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertruletemplates_client.go index 33f8e072d8b2..7f756165719a 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertruletemplates_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_alertruletemplates_client.go @@ -56,7 +56,7 @@ func NewAlertRuleTemplatesClient(subscriptionID string, credential azcore.TokenC // Get - Gets the alert rule template. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // alertRuleTemplateID - Alert rule template ID @@ -100,7 +100,7 @@ func (client *AlertRuleTemplatesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -117,7 +117,7 @@ func (client *AlertRuleTemplatesClient) getHandleResponse(resp *http.Response) ( // NewListPager - Gets all alert rule templates. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - AlertRuleTemplatesClientListOptions contains the optional parameters for the AlertRuleTemplatesClient.List method. @@ -169,7 +169,7 @@ func (client *AlertRuleTemplatesClient) listCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_automationrules_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_automationrules_client.go index 66db42517319..d5007a879a68 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_automationrules_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_automationrules_client.go @@ -56,7 +56,7 @@ func NewAutomationRulesClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Creates or updates the automation rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // automationRuleID - Automation rule ID @@ -101,7 +101,7 @@ func (client *AutomationRulesClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.AutomationRuleToUpsert != nil { @@ -121,7 +121,7 @@ func (client *AutomationRulesClient) createOrUpdateHandleResponse(resp *http.Res // Delete - Delete the automation rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // automationRuleID - Automation rule ID @@ -165,7 +165,7 @@ func (client *AutomationRulesClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *AutomationRulesClient) deleteHandleResponse(resp *http.Response) ( // Get - Gets the automation rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // automationRuleID - Automation rule ID @@ -226,7 +226,7 @@ func (client *AutomationRulesClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +243,7 @@ func (client *AutomationRulesClient) getHandleResponse(resp *http.Response) (Aut // NewListPager - Gets all automation rules. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - AutomationRulesClientListOptions contains the optional parameters for the AutomationRulesClient.List method. @@ -295,7 +295,7 @@ func (client *AutomationRulesClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmark_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmark_client.go index f5657dc8c529..1da525f1290f 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmark_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmark_client.go @@ -56,7 +56,7 @@ func NewBookmarkClient(subscriptionID string, credential azcore.TokenCredential, // Expand - Expand an bookmark // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -101,7 +101,7 @@ func (client *BookmarkClient) expandCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarkrelations_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarkrelations_client.go index a4ad0b73e113..9c48e9440d9d 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarkrelations_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarkrelations_client.go @@ -57,7 +57,7 @@ func NewBookmarkRelationsClient(subscriptionID string, credential azcore.TokenCr // CreateOrUpdate - Creates the bookmark relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -108,7 +108,7 @@ func (client *BookmarkRelationsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, relation) @@ -125,7 +125,7 @@ func (client *BookmarkRelationsClient) createOrUpdateHandleResponse(resp *http.R // Delete - Delete the bookmark relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -175,7 +175,7 @@ func (client *BookmarkRelationsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *BookmarkRelationsClient) deleteCreateRequest(ctx context.Context, // Get - Gets a bookmark relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -232,7 +232,7 @@ func (client *BookmarkRelationsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *BookmarkRelationsClient) getHandleResponse(resp *http.Response) (B // NewListPager - Gets all bookmark relations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -306,7 +306,7 @@ func (client *BookmarkRelationsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarks_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarks_client.go index 9b50e7a2704d..3737e6ef7d09 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarks_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_bookmarks_client.go @@ -56,7 +56,7 @@ func NewBookmarksClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Creates or updates the bookmark. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -102,7 +102,7 @@ func (client *BookmarksClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bookmark) @@ -119,7 +119,7 @@ func (client *BookmarksClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Delete the bookmark. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -163,7 +163,7 @@ func (client *BookmarksClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +171,7 @@ func (client *BookmarksClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets a bookmark. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // bookmarkID - Bookmark ID @@ -215,7 +215,7 @@ func (client *BookmarksClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *BookmarksClient) getHandleResponse(resp *http.Response) (Bookmarks // NewListPager - Gets all bookmarks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - BookmarksClientListOptions contains the optional parameters for the BookmarksClient.List method. @@ -284,7 +284,7 @@ func (client *BookmarksClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_constants.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_constants.go index 2097d51765eb..6968dd8a70c3 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_constants.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_constants.go @@ -859,6 +859,30 @@ func PossibleDeploymentStateValues() []DeploymentState { } } +// DeviceImportance - Device importance, determines if the device classified as 'crown jewel' +type DeviceImportance string + +const ( + // DeviceImportanceHigh - High + DeviceImportanceHigh DeviceImportance = "High" + // DeviceImportanceLow - Low + DeviceImportanceLow DeviceImportance = "Low" + // DeviceImportanceNormal - Normal + DeviceImportanceNormal DeviceImportance = "Normal" + // DeviceImportanceUnknown - Unknown - Default value + DeviceImportanceUnknown DeviceImportance = "Unknown" +) + +// PossibleDeviceImportanceValues returns the possible values for the DeviceImportance const type. +func PossibleDeviceImportanceValues() []DeviceImportance { + return []DeviceImportance{ + DeviceImportanceHigh, + DeviceImportanceLow, + DeviceImportanceNormal, + DeviceImportanceUnknown, + } +} + // ElevationToken - The elevation token associated with the process. type ElevationToken string @@ -926,6 +950,8 @@ const ( EntityKindMailbox EntityKind = "Mailbox" // EntityKindMalware - Entity represents malware in the system. EntityKindMalware EntityKind = "Malware" + // EntityKindNic - Entity represents network interface in the system. + EntityKindNic EntityKind = "Nic" // EntityKindProcess - Entity represents process in the system. EntityKindProcess EntityKind = "Process" // EntityKindRegistryKey - Entity represents registry key in the system. @@ -959,6 +985,7 @@ func PossibleEntityKindValues() []EntityKind { EntityKindMailMessage, EntityKindMailbox, EntityKindMalware, + EntityKindNic, EntityKindProcess, EntityKindRegistryKey, EntityKindRegistryValue, @@ -1139,6 +1166,8 @@ const ( EntityTypeMailbox EntityType = "Mailbox" // EntityTypeMalware - Entity represents malware in the system. EntityTypeMalware EntityType = "Malware" + // EntityTypeNic - Entity represents network interface in the system. + EntityTypeNic EntityType = "Nic" // EntityTypeProcess - Entity represents process in the system. EntityTypeProcess EntityType = "Process" // EntityTypeRegistryKey - Entity represents registry key in the system. @@ -1172,6 +1201,7 @@ func PossibleEntityTypeValues() []EntityType { EntityTypeMailMessage, EntityTypeMailbox, EntityTypeMalware, + EntityTypeNic, EntityTypeProcess, EntityTypeRegistryKey, EntityTypeRegistryValue, diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectors_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectors_client.go index 59adf649bf38..4ea9e7727a38 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectors_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectors_client.go @@ -56,7 +56,7 @@ func NewDataConnectorsClient(subscriptionID string, credential azcore.TokenCrede // Connect - Connects a data connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // dataConnectorID - Connector ID @@ -101,7 +101,7 @@ func (client *DataConnectorsClient) connectCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, connectBody) @@ -109,7 +109,7 @@ func (client *DataConnectorsClient) connectCreateRequest(ctx context.Context, re // CreateOrUpdate - Creates or updates the data connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // dataConnectorID - Connector ID @@ -155,7 +155,7 @@ func (client *DataConnectorsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dataConnector) @@ -172,7 +172,7 @@ func (client *DataConnectorsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete the data connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // dataConnectorID - Connector ID @@ -216,7 +216,7 @@ func (client *DataConnectorsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -224,7 +224,7 @@ func (client *DataConnectorsClient) deleteCreateRequest(ctx context.Context, res // Disconnect - Disconnect a data connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // dataConnectorID - Connector ID @@ -269,7 +269,7 @@ func (client *DataConnectorsClient) disconnectCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -277,7 +277,7 @@ func (client *DataConnectorsClient) disconnectCreateRequest(ctx context.Context, // Get - Gets a data connector. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // dataConnectorID - Connector ID @@ -321,7 +321,7 @@ func (client *DataConnectorsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -338,7 +338,7 @@ func (client *DataConnectorsClient) getHandleResponse(resp *http.Response) (Data // NewListPager - Gets all data connectors. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - DataConnectorsClientListOptions contains the optional parameters for the DataConnectorsClient.List method. @@ -390,7 +390,7 @@ func (client *DataConnectorsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectorscheckrequirements_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectorscheckrequirements_client.go index ff369ed52039..7942425cfaf5 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectorscheckrequirements_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_dataconnectorscheckrequirements_client.go @@ -56,7 +56,7 @@ func NewDataConnectorsCheckRequirementsClient(subscriptionID string, credential // Post - Get requirements state for a data connector type. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // dataConnectorsCheckRequirements - The parameters for requirements check message @@ -97,7 +97,7 @@ func (client *DataConnectorsCheckRequirementsClient) postCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dataConnectorsCheckRequirements) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_domainwhois_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_domainwhois_client.go index d3ac119a5780..045551aa30e4 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_domainwhois_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_domainwhois_client.go @@ -56,7 +56,7 @@ func NewDomainWhoisClient(subscriptionID string, credential azcore.TokenCredenti // Get - Get whois information for a single domain name // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // domain - Domain name to be enriched // options - DomainWhoisClientGetOptions contains the optional parameters for the DomainWhoisClient.Get method. @@ -91,7 +91,7 @@ func (client *DomainWhoisClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") reqQP.Set("domain", domain) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entities_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entities_client.go index 5bfe8b242a62..fc447a1d03a5 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entities_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entities_client.go @@ -56,7 +56,7 @@ func NewEntitiesClient(subscriptionID string, credential azcore.TokenCredential, // Expand - Expands an entity. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -101,7 +101,7 @@ func (client *EntitiesClient) expandCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -118,7 +118,7 @@ func (client *EntitiesClient) expandHandleResponse(resp *http.Response) (Entitie // Get - Gets an entity. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -162,7 +162,7 @@ func (client *EntitiesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +179,7 @@ func (client *EntitiesClient) getHandleResponse(resp *http.Response) (EntitiesCl // GetInsights - Execute Insights for an entity. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -224,7 +224,7 @@ func (client *EntitiesClient) getInsightsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -241,7 +241,7 @@ func (client *EntitiesClient) getInsightsHandleResponse(resp *http.Response) (En // NewListPager - Gets all entities. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - EntitiesClientListOptions contains the optional parameters for the EntitiesClient.List method. @@ -293,7 +293,7 @@ func (client *EntitiesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ func (client *EntitiesClient) listHandleResponse(resp *http.Response) (EntitiesC // Queries - Get Insights and Activities for an entity. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -355,7 +355,7 @@ func (client *EntitiesClient) queriesCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") reqQP.Set("kind", string(kind)) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesgettimeline_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesgettimeline_client.go index ea3075ab4d90..d1db15b6e50b 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesgettimeline_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesgettimeline_client.go @@ -56,7 +56,7 @@ func NewEntitiesGetTimelineClient(subscriptionID string, credential azcore.Token // List - Timeline for an entity. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -102,7 +102,7 @@ func (client *EntitiesGetTimelineClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesrelations_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesrelations_client.go index 2ebedba48f4b..3ce3842b9f49 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesrelations_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entitiesrelations_client.go @@ -57,7 +57,7 @@ func NewEntitiesRelationsClient(subscriptionID string, credential azcore.TokenCr // NewListPager - Gets all relations of an entity. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -114,7 +114,7 @@ func (client *EntitiesRelationsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityqueries_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityqueries_client.go index 7eddd4f75b23..fd27a90658b6 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityqueries_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityqueries_client.go @@ -56,7 +56,7 @@ func NewEntityQueriesClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates or updates the entity query. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityQueryID - entity query ID @@ -102,7 +102,7 @@ func (client *EntityQueriesClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, entityQuery) @@ -119,7 +119,7 @@ func (client *EntityQueriesClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Delete the entity query. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityQueryID - entity query ID @@ -163,7 +163,7 @@ func (client *EntityQueriesClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +171,7 @@ func (client *EntityQueriesClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets an entity query. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityQueryID - entity query ID @@ -215,7 +215,7 @@ func (client *EntityQueriesClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *EntityQueriesClient) getHandleResponse(resp *http.Response) (Entit // NewListPager - Gets all entity queries. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - EntityQueriesClientListOptions contains the optional parameters for the EntityQueriesClient.List method. @@ -287,7 +287,7 @@ func (client *EntityQueriesClient) listCreateRequest(ctx context.Context, resour if options != nil && options.Kind != nil { reqQP.Set("kind", string(*options.Kind)) } - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityquerytemplates_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityquerytemplates_client.go index 75100848a320..eee7b4069e0a 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityquerytemplates_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityquerytemplates_client.go @@ -56,7 +56,7 @@ func NewEntityQueryTemplatesClient(subscriptionID string, credential azcore.Toke // Get - Gets an entity query. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityQueryTemplateID - entity query template ID @@ -101,7 +101,7 @@ func (client *EntityQueryTemplatesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *EntityQueryTemplatesClient) getHandleResponse(resp *http.Response) // NewListPager - Gets all entity query templates. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - EntityQueryTemplatesClientListOptions contains the optional parameters for the EntityQueryTemplatesClient.List @@ -174,7 +174,7 @@ func (client *EntityQueryTemplatesClient) listCreateRequest(ctx context.Context, if options != nil && options.Kind != nil { reqQP.Set("kind", string(*options.Kind)) } - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityrelations_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityrelations_client.go index 5d711af04ae0..85568a906e4c 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityrelations_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_entityrelations_client.go @@ -56,7 +56,7 @@ func NewEntityRelationsClient(subscriptionID string, credential azcore.TokenCred // GetRelation - Gets an entity relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // entityID - entity ID @@ -106,7 +106,7 @@ func (client *EntityRelationsClient) getRelationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentcomments_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentcomments_client.go index 458c0ba87990..7c6ca7895e02 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentcomments_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentcomments_client.go @@ -57,7 +57,7 @@ func NewIncidentCommentsClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdate - Creates or updates the incident comment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -108,7 +108,7 @@ func (client *IncidentCommentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, incidentComment) @@ -125,7 +125,7 @@ func (client *IncidentCommentsClient) createOrUpdateHandleResponse(resp *http.Re // Delete - Delete the incident comment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -174,7 +174,7 @@ func (client *IncidentCommentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +182,7 @@ func (client *IncidentCommentsClient) deleteCreateRequest(ctx context.Context, r // Get - Gets an incident comment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -231,7 +231,7 @@ func (client *IncidentCommentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +248,7 @@ func (client *IncidentCommentsClient) getHandleResponse(resp *http.Response) (In // NewListPager - Gets all incident comments. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -305,7 +305,7 @@ func (client *IncidentCommentsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentrelations_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentrelations_client.go index 2ff16d6063a8..030f676be41b 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentrelations_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidentrelations_client.go @@ -57,7 +57,7 @@ func NewIncidentRelationsClient(subscriptionID string, credential azcore.TokenCr // CreateOrUpdate - Creates or updates the incident relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -108,7 +108,7 @@ func (client *IncidentRelationsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, relation) @@ -125,7 +125,7 @@ func (client *IncidentRelationsClient) createOrUpdateHandleResponse(resp *http.R // Delete - Delete the incident relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -175,7 +175,7 @@ func (client *IncidentRelationsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ func (client *IncidentRelationsClient) deleteCreateRequest(ctx context.Context, // Get - Gets an incident relation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -232,7 +232,7 @@ func (client *IncidentRelationsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *IncidentRelationsClient) getHandleResponse(resp *http.Response) (I // NewListPager - Gets all incident relations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -306,7 +306,7 @@ func (client *IncidentRelationsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidents_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidents_client.go index 5d52d0914bbf..e55a2fd85437 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidents_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_incidents_client.go @@ -57,7 +57,7 @@ func NewIncidentsClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Creates or updates the incident. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -103,7 +103,7 @@ func (client *IncidentsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, incident) @@ -120,7 +120,7 @@ func (client *IncidentsClient) createOrUpdateHandleResponse(resp *http.Response) // CreateTeam - Creates a Microsoft team to investigate the incident by sharing information and insights between participants. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -165,7 +165,7 @@ func (client *IncidentsClient) createTeamCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, teamProperties) @@ -182,7 +182,7 @@ func (client *IncidentsClient) createTeamHandleResponse(resp *http.Response) (In // Delete - Delete the incident. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -226,7 +226,7 @@ func (client *IncidentsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *IncidentsClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets an incident. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -278,7 +278,7 @@ func (client *IncidentsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,7 +295,7 @@ func (client *IncidentsClient) getHandleResponse(resp *http.Response) (Incidents // NewListPager - Gets all incidents. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - IncidentsClientListOptions contains the optional parameters for the IncidentsClient.List method. @@ -347,7 +347,7 @@ func (client *IncidentsClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -376,7 +376,7 @@ func (client *IncidentsClient) listHandleResponse(resp *http.Response) (Incident // ListAlerts - Gets all incident alerts. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -420,7 +420,7 @@ func (client *IncidentsClient) listAlertsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -437,7 +437,7 @@ func (client *IncidentsClient) listAlertsHandleResponse(resp *http.Response) (In // ListBookmarks - Gets all incident bookmarks. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -481,7 +481,7 @@ func (client *IncidentsClient) listBookmarksCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -498,7 +498,7 @@ func (client *IncidentsClient) listBookmarksHandleResponse(resp *http.Response) // ListEntities - Gets all incident related entities. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // incidentID - Incident ID @@ -542,7 +542,7 @@ func (client *IncidentsClient) listEntitiesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -559,7 +559,7 @@ func (client *IncidentsClient) listEntitiesHandleResponse(resp *http.Response) ( // RunPlaybook - Triggers playbook on a specific incident // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - IncidentsClientRunPlaybookOptions contains the optional parameters for the IncidentsClient.RunPlaybook method. @@ -602,7 +602,7 @@ func (client *IncidentsClient) runPlaybookCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.RequestBody != nil { diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_ipgeodata_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_ipgeodata_client.go index 965c9716ec89..0772094b1e22 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_ipgeodata_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_ipgeodata_client.go @@ -56,7 +56,7 @@ func NewIPGeodataClient(subscriptionID string, credential azcore.TokenCredential // Get - Get geodata for a single IP address // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // ipAddress - IP address (v4 or v6) to be enriched // options - IPGeodataClientGetOptions contains the optional parameters for the IPGeodataClient.Get method. @@ -91,7 +91,7 @@ func (client *IPGeodataClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") reqQP.Set("ipAddress", ipAddress) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_metadata_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_metadata_client.go index bcee62552034..32cbc01a3caf 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_metadata_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_metadata_client.go @@ -57,7 +57,7 @@ func NewMetadataClient(subscriptionID string, credential azcore.TokenCredential, // Create - Create a Metadata. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // metadataName - The Metadata name. @@ -102,7 +102,7 @@ func (client *MetadataClient) createCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, metadata) @@ -119,7 +119,7 @@ func (client *MetadataClient) createHandleResponse(resp *http.Response) (Metadat // Delete - Delete a Metadata. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // metadataName - The Metadata name. @@ -163,7 +163,7 @@ func (client *MetadataClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +171,7 @@ func (client *MetadataClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get a Metadata. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // metadataName - The Metadata name. @@ -215,7 +215,7 @@ func (client *MetadataClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *MetadataClient) getHandleResponse(resp *http.Response) (MetadataCl // NewListPager - List of all metadata // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - MetadataClientListOptions contains the optional parameters for the MetadataClient.List method. @@ -284,7 +284,7 @@ func (client *MetadataClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -313,7 +313,7 @@ func (client *MetadataClient) listHandleResponse(resp *http.Response) (MetadataC // Update - Update an existing Metadata. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // metadataName - The Metadata name. @@ -358,7 +358,7 @@ func (client *MetadataClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, metadataPatch) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models.go index 6cf39bbf320f..77fb483c15b1 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models.go @@ -2169,9 +2169,19 @@ type DataConnectorConnectBody struct { // The client secret of the OAuth 2.0 application. ClientSecret *string `json:"clientSecret,omitempty"` + // Used in v2 logs connector. Represents the data collection ingestion endpoint in log analytics. + DataCollectionEndpoint *string `json:"dataCollectionEndpoint,omitempty"` + + // Used in v2 logs connector. The data collection rule immutable id, the rule defines the transformation and data destination. + DataCollectionRuleImmutableID *string `json:"dataCollectionRuleImmutableId,omitempty"` + // The authentication kind used to poll the data Kind *ConnectAuthKind `json:"kind,omitempty"` + // Used in v2 logs connector. The stream we are sending the data to, this is the name of the streamDeclarations defined in + // the DCR. + OutputStream *string `json:"outputStream,omitempty"` + // The user password in the audit log server. Password *string `json:"password,omitempty"` RequestConfigUserInputValues []interface{} `json:"requestConfigUserInputValues,omitempty"` @@ -2604,7 +2614,7 @@ type EntitiesRelationsClientListOptions struct { // Use a type switch to determine the concrete type. The possible types are: // - *AccountEntity, *AzureResourceEntity, *CloudApplicationEntity, *DNSEntity, *Entity, *FileEntity, *FileHashEntity, *HostEntity, // - *HuntingBookmark, *IPEntity, *IoTDeviceEntity, *MailClusterEntity, *MailMessageEntity, *MailboxEntity, *MalwareEntity, -// - *ProcessEntity, *RegistryKeyEntity, *RegistryValueEntity, *SecurityAlert, *SecurityGroupEntity, *SubmissionMailEntity, +// - *NicEntity, *ProcessEntity, *RegistryKeyEntity, *RegistryValueEntity, *SecurityAlert, *SecurityGroupEntity, *SubmissionMailEntity, // - *URLEntity type EntityClassification interface { // GetEntity returns the Entity content of the underlying type. @@ -4417,6 +4427,9 @@ func (i *IoTDeviceEntity) GetEntity() *Entity { // IoTDeviceEntityProperties - IoTDevice entity property bag. type IoTDeviceEntityProperties struct { + // Device importance, determines if the device classified as 'crown jewel' + Importance *DeviceImportance `json:"importance,omitempty"` + // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. AdditionalData map[string]interface{} `json:"additionalData,omitempty" azure:"ro"` @@ -4426,6 +4439,9 @@ type IoTDeviceEntityProperties struct { // READ-ONLY; The friendly name of the device DeviceName *string `json:"deviceName,omitempty" azure:"ro"` + // READ-ONLY; The subType of the device ('PLC', 'HMI', 'EWS', etc.) + DeviceSubType *string `json:"deviceSubType,omitempty" azure:"ro"` + // READ-ONLY; The type of the device DeviceType *string `json:"deviceType,omitempty" azure:"ro"` @@ -4451,21 +4467,45 @@ type IoTDeviceEntityProperties struct { // READ-ONLY; The ID of the security agent running on the device IotSecurityAgentID *string `json:"iotSecurityAgentId,omitempty" azure:"ro"` + // READ-ONLY; Determines whether the device classified as authorized device + IsAuthorized *bool `json:"isAuthorized,omitempty" azure:"ro"` + + // READ-ONLY; Determines whether the device classified as programming device + IsProgramming *bool `json:"isProgramming,omitempty" azure:"ro"` + + // READ-ONLY; Is the device classified as a scanner device + IsScanner *bool `json:"isScanner,omitempty" azure:"ro"` + // READ-ONLY; The MAC address of the device MacAddress *string `json:"macAddress,omitempty" azure:"ro"` // READ-ONLY; The model of the device Model *string `json:"model,omitempty" azure:"ro"` + // READ-ONLY; A list of Nic entity ids of the IoTDevice entity. + NicEntityIDs []*string `json:"nicEntityIds,omitempty" azure:"ro"` + // READ-ONLY; The operating system of the device OperatingSystem *string `json:"operatingSystem,omitempty" azure:"ro"` + // READ-ONLY; A list of owners of the IoTDevice entity. + Owners []*string `json:"owners,omitempty" azure:"ro"` + // READ-ONLY; A list of protocols of the IoTDevice entity. Protocols []*string `json:"protocols,omitempty" azure:"ro"` + // READ-ONLY; The Purdue Layer of the device + PurdueLayer *string `json:"purdueLayer,omitempty" azure:"ro"` + + // READ-ONLY; The sensor the device is monitored by + Sensor *string `json:"sensor,omitempty" azure:"ro"` + // READ-ONLY; The serial number of the device SerialNumber *string `json:"serialNumber,omitempty" azure:"ro"` + // READ-ONLY; The site of the device + Site *string `json:"site,omitempty" azure:"ro"` + // READ-ONLY; The source of the device Source *string `json:"source,omitempty" azure:"ro"` @@ -4474,6 +4514,9 @@ type IoTDeviceEntityProperties struct { // READ-ONLY; The vendor of the device Vendor *string `json:"vendor,omitempty" azure:"ro"` + + // READ-ONLY; The zone location of the device within a site + Zone *string `json:"zone,omitempty" azure:"ro"` } // LastDataReceivedDataType - Data type for last data received @@ -5688,6 +5731,57 @@ func (m *MtpCheckRequirements) GetDataConnectorsCheckRequirements() *DataConnect } } +// NicEntity - Represents an network interface entity. +type NicEntity struct { + // REQUIRED; The kind of the entity. + Kind *EntityKind `json:"kind,omitempty"` + + // Network interface entity properties + Properties *NicEntityProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetEntity implements the EntityClassification interface for type NicEntity. +func (n *NicEntity) GetEntity() *Entity { + return &Entity{ + Kind: n.Kind, + ID: n.ID, + Name: n.Name, + Type: n.Type, + SystemData: n.SystemData, + } +} + +// NicEntityProperties - Nic entity property bag. +type NicEntityProperties struct { + // READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. + AdditionalData map[string]interface{} `json:"additionalData,omitempty" azure:"ro"` + + // READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property + // is optional and might be system generated. + FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` + + // READ-ONLY; The IP entity id of this network interface + IPAddressEntityID *string `json:"ipAddressEntityId,omitempty" azure:"ro"` + + // READ-ONLY; The MAC address of this network interface + MacAddress *string `json:"macAddress,omitempty" azure:"ro"` + + // READ-ONLY; A list of VLANs of the network interface entity. + Vlans []*string `json:"vlans,omitempty" azure:"ro"` +} + // NrtAlertRule - Represents NRT alert rule. type NrtAlertRule struct { // REQUIRED; The kind of the alert rule diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models_serde.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models_serde.go index 1ff395cfcc16..522504f1da79 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models_serde.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_models_serde.go @@ -1883,7 +1883,10 @@ func (d DataConnectorConnectBody) MarshalJSON() ([]byte, error) { populate(objectMap, "authorizationCode", d.AuthorizationCode) populate(objectMap, "clientId", d.ClientID) populate(objectMap, "clientSecret", d.ClientSecret) + populate(objectMap, "dataCollectionEndpoint", d.DataCollectionEndpoint) + populate(objectMap, "dataCollectionRuleImmutableId", d.DataCollectionRuleImmutableID) populate(objectMap, "kind", d.Kind) + populate(objectMap, "outputStream", d.OutputStream) populate(objectMap, "password", d.Password) populate(objectMap, "requestConfigUserInputValues", d.RequestConfigUserInputValues) populate(objectMap, "userName", d.UserName) @@ -3533,22 +3536,33 @@ func (i IoTDeviceEntityProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "additionalData", i.AdditionalData) populate(objectMap, "deviceId", i.DeviceID) populate(objectMap, "deviceName", i.DeviceName) + populate(objectMap, "deviceSubType", i.DeviceSubType) populate(objectMap, "deviceType", i.DeviceType) populate(objectMap, "edgeId", i.EdgeID) populate(objectMap, "firmwareVersion", i.FirmwareVersion) populate(objectMap, "friendlyName", i.FriendlyName) populate(objectMap, "hostEntityId", i.HostEntityID) populate(objectMap, "ipAddressEntityId", i.IPAddressEntityID) + populate(objectMap, "importance", i.Importance) populate(objectMap, "iotHubEntityId", i.IotHubEntityID) populate(objectMap, "iotSecurityAgentId", i.IotSecurityAgentID) + populate(objectMap, "isAuthorized", i.IsAuthorized) + populate(objectMap, "isProgramming", i.IsProgramming) + populate(objectMap, "isScanner", i.IsScanner) populate(objectMap, "macAddress", i.MacAddress) populate(objectMap, "model", i.Model) + populate(objectMap, "nicEntityIds", i.NicEntityIDs) populate(objectMap, "operatingSystem", i.OperatingSystem) + populate(objectMap, "owners", i.Owners) populate(objectMap, "protocols", i.Protocols) + populate(objectMap, "purdueLayer", i.PurdueLayer) + populate(objectMap, "sensor", i.Sensor) populate(objectMap, "serialNumber", i.SerialNumber) + populate(objectMap, "site", i.Site) populate(objectMap, "source", i.Source) populate(objectMap, "threatIntelligence", i.ThreatIntelligence) populate(objectMap, "vendor", i.Vendor) + populate(objectMap, "zone", i.Zone) return json.Marshal(objectMap) } @@ -4994,6 +5008,64 @@ func (m *MtpCheckRequirements) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NicEntity. +func (n NicEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", n.ID) + objectMap["kind"] = EntityKindNic + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "systemData", n.SystemData) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NicEntity. +func (n *NicEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &n.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &n.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NicEntityProperties. +func (n NicEntityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "additionalData", n.AdditionalData) + populate(objectMap, "friendlyName", n.FriendlyName) + populate(objectMap, "ipAddressEntityId", n.IPAddressEntityID) + populate(objectMap, "macAddress", n.MacAddress) + populate(objectMap, "vlans", n.Vlans) + return json.Marshal(objectMap) +} + // MarshalJSON implements the json.Marshaller interface for type NrtAlertRule. func (n NrtAlertRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_officeconsents_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_officeconsents_client.go index 1d5b25e9fb2e..36bbe5cbb323 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_officeconsents_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_officeconsents_client.go @@ -56,7 +56,7 @@ func NewOfficeConsentsClient(subscriptionID string, credential azcore.TokenCrede // Delete - Delete the office365 consent. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // consentID - consent ID @@ -100,7 +100,7 @@ func (client *OfficeConsentsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,7 +108,7 @@ func (client *OfficeConsentsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets an office365 consent. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // consentID - consent ID @@ -152,7 +152,7 @@ func (client *OfficeConsentsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,7 +169,7 @@ func (client *OfficeConsentsClient) getHandleResponse(resp *http.Response) (Offi // NewListPager - Gets all office365 consents. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - OfficeConsentsClientListOptions contains the optional parameters for the OfficeConsentsClient.List method. @@ -221,7 +221,7 @@ func (client *OfficeConsentsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_operations_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_operations_client.go index dd47a1d25fa3..dfa10b3f6a07 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_operations_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_operations_client.go @@ -50,7 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all operations available Azure Security Insights Resource Provider. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -88,7 +88,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_polymorphic_helpers.go index 39781f1084de..8e79bbab6722 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_polymorphic_helpers.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_polymorphic_helpers.go @@ -297,6 +297,8 @@ func unmarshalEntityClassification(rawMsg json.RawMessage) (EntityClassification b = &MailboxEntity{} case string(EntityKindMalware): b = &MalwareEntity{} + case string(EntityKindNic): + b = &NicEntity{} case string(EntityKindProcess): b = &ProcessEntity{} case string(EntityKindRegistryKey): diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_productsettings_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_productsettings_client.go index c84f02a16951..31282bf234ef 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_productsettings_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_productsettings_client.go @@ -56,7 +56,7 @@ func NewProductSettingsClient(subscriptionID string, credential azcore.TokenCred // Delete - Delete setting of the product. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // settingsName - The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba @@ -100,7 +100,7 @@ func (client *ProductSettingsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,7 +108,7 @@ func (client *ProductSettingsClient) deleteCreateRequest(ctx context.Context, re // Get - Gets a setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // settingsName - The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba @@ -152,7 +152,7 @@ func (client *ProductSettingsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,7 +169,7 @@ func (client *ProductSettingsClient) getHandleResponse(resp *http.Response) (Pro // List - List of all the settings // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - ProductSettingsClientListOptions contains the optional parameters for the ProductSettingsClient.List method. @@ -208,7 +208,7 @@ func (client *ProductSettingsClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *ProductSettingsClient) listHandleResponse(resp *http.Response) (Pr // Update - Updates setting. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // settingsName - The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba @@ -270,7 +270,7 @@ func (client *ProductSettingsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, settings) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_securitymlanalyticssettings_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_securitymlanalyticssettings_client.go index 406c9e68fe67..f7518300b8b7 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_securitymlanalyticssettings_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_securitymlanalyticssettings_client.go @@ -56,7 +56,7 @@ func NewSecurityMLAnalyticsSettingsClient(subscriptionID string, credential azco // CreateOrUpdate - Creates or updates the Security ML Analytics Settings. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // settingsResourceName - Security ML Analytics Settings resource name @@ -102,7 +102,7 @@ func (client *SecurityMLAnalyticsSettingsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, securityMLAnalyticsSetting) @@ -119,7 +119,7 @@ func (client *SecurityMLAnalyticsSettingsClient) createOrUpdateHandleResponse(re // Delete - Delete the Security ML Analytics Settings. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // settingsResourceName - Security ML Analytics Settings resource name @@ -164,7 +164,7 @@ func (client *SecurityMLAnalyticsSettingsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,7 @@ func (client *SecurityMLAnalyticsSettingsClient) deleteCreateRequest(ctx context // Get - Gets the Security ML Analytics Settings. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // settingsResourceName - Security ML Analytics Settings resource name @@ -217,7 +217,7 @@ func (client *SecurityMLAnalyticsSettingsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +234,7 @@ func (client *SecurityMLAnalyticsSettingsClient) getHandleResponse(resp *http.Re // NewListPager - Gets all Security ML Analytics Settings. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - SecurityMLAnalyticsSettingsClientListOptions contains the optional parameters for the SecurityMLAnalyticsSettingsClient.List @@ -287,7 +287,7 @@ func (client *SecurityMLAnalyticsSettingsClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sentinelonboardingstates_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sentinelonboardingstates_client.go index a9fb104e4e16..d6f09ec9893a 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sentinelonboardingstates_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sentinelonboardingstates_client.go @@ -56,7 +56,7 @@ func NewSentinelOnboardingStatesClient(subscriptionID string, credential azcore. // Create - Create Sentinel onboarding state // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // sentinelOnboardingStateName - The Sentinel onboarding state name. Supports - default @@ -101,7 +101,7 @@ func (client *SentinelOnboardingStatesClient) createCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.SentinelOnboardingStateParameter != nil { @@ -121,7 +121,7 @@ func (client *SentinelOnboardingStatesClient) createHandleResponse(resp *http.Re // Delete - Delete Sentinel onboarding state // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // sentinelOnboardingStateName - The Sentinel onboarding state name. Supports - default @@ -166,7 +166,7 @@ func (client *SentinelOnboardingStatesClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -174,7 +174,7 @@ func (client *SentinelOnboardingStatesClient) deleteCreateRequest(ctx context.Co // Get - Get Sentinel onboarding state // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // sentinelOnboardingStateName - The Sentinel onboarding state name. Supports - default @@ -219,7 +219,7 @@ func (client *SentinelOnboardingStatesClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,7 +236,7 @@ func (client *SentinelOnboardingStatesClient) getHandleResponse(resp *http.Respo // List - Gets all Sentinel onboarding states // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - SentinelOnboardingStatesClientListOptions contains the optional parameters for the SentinelOnboardingStatesClient.List @@ -276,7 +276,7 @@ func (client *SentinelOnboardingStatesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrol_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrol_client.go index 44ab451b7c57..6428a72acfb0 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrol_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrol_client.go @@ -56,7 +56,7 @@ func NewSourceControlClient(subscriptionID string, credential azcore.TokenCreden // NewListRepositoriesPager - Gets a list of repositories metadata. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // repoType - The repo type. @@ -110,7 +110,7 @@ func (client *SourceControlClient) listRepositoriesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, repoType) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrols_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrols_client.go index 0fb473103c49..2051d3d56c01 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrols_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_sourcecontrols_client.go @@ -56,7 +56,7 @@ func NewSourceControlsClient(subscriptionID string, credential azcore.TokenCrede // Create - Creates a source control. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // sourceControlID - Source control Id @@ -101,7 +101,7 @@ func (client *SourceControlsClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, sourceControl) @@ -118,7 +118,7 @@ func (client *SourceControlsClient) createHandleResponse(resp *http.Response) (S // Delete - Delete a source control. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // sourceControlID - Source control Id @@ -162,7 +162,7 @@ func (client *SourceControlsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,7 +170,7 @@ func (client *SourceControlsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a source control byt its identifier. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // sourceControlID - Source control Id @@ -214,7 +214,7 @@ func (client *SourceControlsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,7 +231,7 @@ func (client *SourceControlsClient) getHandleResponse(resp *http.Response) (Sour // NewListPager - Gets all source controls, without source control items. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - SourceControlsClientListOptions contains the optional parameters for the SourceControlsClient.List method. @@ -283,7 +283,7 @@ func (client *SourceControlsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicator_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicator_client.go index 7e7f314c3fd5..ec356792f9ee 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicator_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicator_client.go @@ -56,7 +56,7 @@ func NewThreatIntelligenceIndicatorClient(subscriptionID string, credential azco // AppendTags - Append tags to a threat intelligence indicator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // name - Threat intelligence indicator name field. @@ -102,7 +102,7 @@ func (client *ThreatIntelligenceIndicatorClient) appendTagsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, threatIntelligenceAppendTags) @@ -110,7 +110,7 @@ func (client *ThreatIntelligenceIndicatorClient) appendTagsCreateRequest(ctx con // Create - Update a threat Intelligence indicator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // name - Threat intelligence indicator name field. @@ -156,7 +156,7 @@ func (client *ThreatIntelligenceIndicatorClient) createCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, threatIntelligenceProperties) @@ -173,7 +173,7 @@ func (client *ThreatIntelligenceIndicatorClient) createHandleResponse(resp *http // CreateIndicator - Create a new threat intelligence indicator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // threatIntelligenceProperties - Properties of threat intelligence indicators to create and update. @@ -214,7 +214,7 @@ func (client *ThreatIntelligenceIndicatorClient) createIndicatorCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, threatIntelligenceProperties) @@ -231,7 +231,7 @@ func (client *ThreatIntelligenceIndicatorClient) createIndicatorHandleResponse(r // Delete - Delete a threat intelligence indicator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // name - Threat intelligence indicator name field. @@ -276,7 +276,7 @@ func (client *ThreatIntelligenceIndicatorClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +284,7 @@ func (client *ThreatIntelligenceIndicatorClient) deleteCreateRequest(ctx context // Get - View a threat intelligence indicator by name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // name - Threat intelligence indicator name field. @@ -329,7 +329,7 @@ func (client *ThreatIntelligenceIndicatorClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +346,7 @@ func (client *ThreatIntelligenceIndicatorClient) getHandleResponse(resp *http.Re // NewQueryIndicatorsPager - Query threat intelligence indicators as per filtering criteria. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // threatIntelligenceFilteringCriteria - Filtering criteria for querying threat intelligence indicators. @@ -400,7 +400,7 @@ func (client *ThreatIntelligenceIndicatorClient) queryIndicatorsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, threatIntelligenceFilteringCriteria) @@ -417,7 +417,7 @@ func (client *ThreatIntelligenceIndicatorClient) queryIndicatorsHandleResponse(r // ReplaceTags - Replace tags added to a threat intelligence indicator. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // name - Threat intelligence indicator name field. @@ -463,7 +463,7 @@ func (client *ThreatIntelligenceIndicatorClient) replaceTagsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, threatIntelligenceReplaceTags) diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicatormetrics_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicatormetrics_client.go index 6eae22aa50dc..e3cc39fae22f 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicatormetrics_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicatormetrics_client.go @@ -56,7 +56,7 @@ func NewThreatIntelligenceIndicatorMetricsClient(subscriptionID string, credenti // List - Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - ThreatIntelligenceIndicatorMetricsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorMetricsClient.List @@ -96,7 +96,7 @@ func (client *ThreatIntelligenceIndicatorMetricsClient) listCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicators_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicators_client.go index df93e12c970e..251569d5443b 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicators_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_threatintelligenceindicators_client.go @@ -57,7 +57,7 @@ func NewThreatIntelligenceIndicatorsClient(subscriptionID string, credential azc // NewListPager - Get all threat intelligence indicators. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - ThreatIntelligenceIndicatorsClientListOptions contains the optional parameters for the ThreatIntelligenceIndicatorsClient.List @@ -110,7 +110,7 @@ func (client *ThreatIntelligenceIndicatorsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlistitems_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlistitems_client.go index bea60fa242e9..01b8aa10d5e2 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlistitems_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlistitems_client.go @@ -56,7 +56,7 @@ func NewWatchlistItemsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or updates a watchlist item. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -107,7 +107,7 @@ func (client *WatchlistItemsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, watchlistItem) @@ -124,7 +124,7 @@ func (client *WatchlistItemsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete a watchlist item. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -173,7 +173,7 @@ func (client *WatchlistItemsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +181,7 @@ func (client *WatchlistItemsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a watchlist, without its watchlist items. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -230,7 +230,7 @@ func (client *WatchlistItemsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ func (client *WatchlistItemsClient) getHandleResponse(resp *http.Response) (Watc // NewListPager - Gets all watchlist Items. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -304,7 +304,7 @@ func (client *WatchlistItemsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } diff --git a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlists_client.go b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlists_client.go index 6770819081d5..7052c4d03462 100644 --- a/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlists_client.go +++ b/sdk/resourcemanager/securityinsights/armsecurityinsights/zz_generated_watchlists_client.go @@ -61,7 +61,7 @@ func NewWatchlistsClient(subscriptionID string, credential azcore.TokenCredentia // go up to 500 MB. The status of processing such large file can be polled through the URL returned in Azure-AsyncOperation // header. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -107,7 +107,7 @@ func (client *WatchlistsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, watchlist) @@ -127,7 +127,7 @@ func (client *WatchlistsClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete a watchlist. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -171,7 +171,7 @@ func (client *WatchlistsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ func (client *WatchlistsClient) deleteHandleResponse(resp *http.Response) (Watch // Get - Gets a watchlist, without its watchlist items. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // watchlistAlias - Watchlist Alias @@ -232,7 +232,7 @@ func (client *WatchlistsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *WatchlistsClient) getHandleResponse(resp *http.Response) (Watchlis // NewListPager - Gets all watchlists, without watchlist items. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview +// Generated from API version 2022-07-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - WatchlistsClientListOptions contains the optional parameters for the WatchlistsClient.List method. @@ -301,7 +301,7 @@ func (client *WatchlistsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") + reqQP.Set("api-version", "2022-07-01-preview") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) }