Skip to content

Commit

Permalink
revert useless functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyeqf committed Dec 10, 2024
1 parent 1a92687 commit e7acaf3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 425 deletions.
14 changes: 3 additions & 11 deletions internal/services/sentinel/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists"
newalertrules "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/alertrules"
"github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/alertrules"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
securityinsight "github.com/jackofallops/kermit/sdk/securityinsights/2022-10-01-preview/securityinsights"
)

type Client struct {
AlertRulesClient *newalertrules.AlertRulesClient
AlertRulesClient *alertrules.AlertRulesClient
AlertRuleTemplatesClient *alertruletemplates.AlertRuleTemplatesClient
AutomationRulesClient *automationrules.AutomationRulesClient
DataConnectorsClient *securityinsight.DataConnectorsClient
Expand All @@ -28,11 +28,10 @@ type Client struct {
AnalyticsSettingsClient *securityinsight.SecurityMLAnalyticsSettingsClient
ThreatIntelligenceClient *securityinsight.ThreatIntelligenceIndicatorClient
MetadataClient *metadata.MetadataClient
NewAlertRulesClient *newalertrules.AlertRulesClient
}

func NewClient(o *common.ClientOptions) (*Client, error) {
alertRulesClient, err := newalertrules.NewAlertRulesClientWithBaseURI(o.Environment.ResourceManager)
alertRulesClient, err := alertrules.NewAlertRulesClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Alert Rules Client: %+v", err)
}
Expand Down Expand Up @@ -80,12 +79,6 @@ func NewClient(o *common.ClientOptions) (*Client, error) {
}
o.Configure(metadataClient.Client, o.Authorizers.ResourceManager)

newAlertRulesClient, err := newalertrules.NewAlertRulesClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building New Alert Rules Client: %+v", err)
}
o.Configure(newAlertRulesClient.Client, o.Authorizers.ResourceManager)

return &Client{
AlertRulesClient: alertRulesClient,
AlertRuleTemplatesClient: &alertRuleTemplatesClient,
Expand All @@ -97,6 +90,5 @@ func NewClient(o *common.ClientOptions) (*Client, error) {
AnalyticsSettingsClient: &analyticsSettingsClient,
ThreatIntelligenceClient: &threatIntelligenceClient,
MetadataClient: metadataClient,
NewAlertRulesClient: newAlertRulesClient,
}, nil
}
Loading

0 comments on commit e7acaf3

Please sign in to comment.