Skip to content

Commit

Permalink
dependencies: updating to v0.20240228.1142829 of `github.com/hashic…
Browse files Browse the repository at this point in the history
…orp/go-azure-sdk` (#25081)

* update go-azure-sdk to v0.20240228.1142829

* sort imports
  • Loading branch information
catriona-m authored Feb 29, 2024
1 parent ec2ecc0 commit 04eb175
Show file tree
Hide file tree
Showing 66 changed files with 2,008 additions and 2,501 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ require (
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.1
github.com/hashicorp/go-azure-helpers v0.66.2
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240227.1172434
github.com/hashicorp/go-azure-sdk/sdk v0.20240227.1172434
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240228.1142829
github.com/hashicorp/go-azure-sdk/sdk v0.20240228.1142829
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-uuid v1.0.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg=
github.com/hashicorp/go-azure-helpers v0.66.2 h1:+Pzuo7pdKl0hBXXr5ymmhs4Q40tHAo2nAvHq4WgSjx8=
github.com/hashicorp/go-azure-helpers v0.66.2/go.mod h1:kJxXrFtJKJdOEqvad8pllAe7dhP4DbN8J6sqFZe47+4=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240227.1172434 h1:UNp65kdO4noJDrEe99Od5NfXSnjrrTs0dEyw2MM8jK0=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240227.1172434/go.mod h1:8Pmp8Bg+FDUjkbuuiLLqysKrKUu5dOIf1dX3KFKNSU8=
github.com/hashicorp/go-azure-sdk/sdk v0.20240227.1172434 h1:IX9e6DRUYl+1skjZPpfdhnEV3cx8dNX1qECYSVcD288=
github.com/hashicorp/go-azure-sdk/sdk v0.20240227.1172434/go.mod h1:IKIPyL+hfFWBHABKT0NOWlIEzlusiUBG0SxIfaiv278=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240228.1142829 h1:hvfN48POr1yZXJSzW71ynTVGfMQgLmX4NDJ3lPkiwgs=
github.com/hashicorp/go-azure-sdk/resource-manager v0.20240228.1142829/go.mod h1:89N0LAkz404ZWWJfW1RVl/x8Xv8RdUAuc2rqkNo7za8=
github.com/hashicorp/go-azure-sdk/sdk v0.20240228.1142829 h1:eRWPAvNi95VOZBKJYY9yikyorCLMgFpQnJZOpCZAzj4=
github.com/hashicorp/go-azure-sdk/sdk v0.20240228.1142829/go.mod h1:IKIPyL+hfFWBHABKT0NOWlIEzlusiUBG0SxIfaiv278=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
Expand Down
4 changes: 3 additions & 1 deletion internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.Search, err = search.NewClient(o); err != nil {
return fmt.Errorf("building clients for Search: %+v", err)
}
client.SecurityCenter = securityCenter.NewClient(o)
if client.SecurityCenter, err = securityCenter.NewClient(o); err != nil {
return fmt.Errorf("building clients for Security Center: %+v", err)
}
if client.Sentinel, err = sentinel.NewClient(o); err != nil {
return fmt.Errorf("building clients for Sentinel: %+v", err)
}
Expand Down
60 changes: 40 additions & 20 deletions internal/services/securitycenter/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package client

import (
"fmt"

"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v3.0/security" // nolint: staticcheck
"github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/automations"
"github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata"
Expand Down Expand Up @@ -31,14 +33,17 @@ type Client struct {
DefenderForStorageClient *defenderforstorage.DefenderForStorageClient
}

func NewClient(o *common.ClientOptions) *Client {
func NewClient(o *common.ClientOptions) (*Client, error) {
ascLocation := "Global"

AssessmentsClient := security.NewAssessmentsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId, ascLocation)
o.ConfigureClient(&AssessmentsClient.Client, o.ResourceManagerAuthorizer)

AssessmentsMetadataClient := assessmentsmetadata.NewAssessmentsMetadataClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&AssessmentsMetadataClient.Client, o.ResourceManagerAuthorizer)
AssessmentsMetadataClient, err := assessmentsmetadata.NewAssessmentsMetadataClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Assessments Metadata client : %+v", err)
}
o.Configure(AssessmentsMetadataClient.Client, o.Authorizers.ResourceManager)

ContactsClient := security.NewContactsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId, ascLocation)
o.ConfigureClient(&ContactsClient.Client, o.ResourceManagerAuthorizer)
Expand All @@ -49,8 +54,11 @@ func NewClient(o *common.ClientOptions) *Client {
IotSecuritySolutionClient := security.NewIotSecuritySolutionClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId, ascLocation)
o.ConfigureClient(&IotSecuritySolutionClient.Client, o.ResourceManagerAuthorizer)

PricingClient := pricings_v2023_01_01.NewPricingsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&PricingClient.Client, o.ResourceManagerAuthorizer)
PricingClient, err := pricings_v2023_01_01.NewPricingsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Pricing client : %+v", err)
}
o.Configure(PricingClient.Client, o.Authorizers.ResourceManager)

WorkspaceClient := security.NewWorkspaceSettingsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId, ascLocation)
o.ConfigureClient(&WorkspaceClient.Client, o.ResourceManagerAuthorizer)
Expand All @@ -61,35 +69,47 @@ func NewClient(o *common.ClientOptions) *Client {
AutoProvisioningClient := security.NewAutoProvisioningSettingsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId, ascLocation)
o.ConfigureClient(&AutoProvisioningClient.Client, o.ResourceManagerAuthorizer)

SettingClient := settings.NewSettingsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&SettingClient.Client, o.ResourceManagerAuthorizer)
SettingClient, err := settings.NewSettingsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Setting client : %+v", err)
}
o.Configure(SettingClient.Client, o.Authorizers.ResourceManager)

AutomationsClient := automations.NewAutomationsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&AutomationsClient.Client, o.ResourceManagerAuthorizer)
AutomationsClient, err := automations.NewAutomationsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Automations client : %+v", err)
}
o.Configure(AutomationsClient.Client, o.Authorizers.ResourceManager)

ServerVulnerabilityAssessmentClient := security.NewServerVulnerabilityAssessmentClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId, ascLocation)
o.ConfigureClient(&ServerVulnerabilityAssessmentClient.Client, o.ResourceManagerAuthorizer)

ServerVulnerabilityAssessmentSettingClient := servervulnerabilityassessmentssettings.NewServerVulnerabilityAssessmentsSettingsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&ServerVulnerabilityAssessmentSettingClient.Client, o.ResourceManagerAuthorizer)
ServerVulnerabilityAssessmentSettingClient, err := servervulnerabilityassessmentssettings.NewServerVulnerabilityAssessmentsSettingsClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Server Vulnerability Assessment Setting client : %+v", err)
}
o.Configure(ServerVulnerabilityAssessmentSettingClient.Client, o.Authorizers.ResourceManager)

DefenderForStorageClient := defenderforstorage.NewDefenderForStorageClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&DefenderForStorageClient.Client, o.ResourceManagerAuthorizer)
DefenderForStorageClient, err := defenderforstorage.NewDefenderForStorageClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Defender For Storage client : %+v", err)
}
o.Configure(DefenderForStorageClient.Client, o.Authorizers.ResourceManager)

return &Client{
AssessmentsClient: &AssessmentsClient,
AssessmentsMetadataClient: &AssessmentsMetadataClient,
AssessmentsMetadataClient: AssessmentsMetadataClient,
ContactsClient: &ContactsClient,
DeviceSecurityGroupsClient: &DeviceSecurityGroupsClient,
IotSecuritySolutionClient: &IotSecuritySolutionClient,
PricingClient: &PricingClient,
PricingClient: PricingClient,
WorkspaceClient: &WorkspaceClient,
AdvancedThreatProtectionClient: &AdvancedThreatProtectionClient,
AutoProvisioningClient: &AutoProvisioningClient,
SettingClient: &SettingClient,
AutomationsClient: &AutomationsClient,
SettingClient: SettingClient,
AutomationsClient: AutomationsClient,
ServerVulnerabilityAssessmentClient: &ServerVulnerabilityAssessmentClient,
ServerVulnerabilityAssessmentSettingClient: &ServerVulnerabilityAssessmentSettingClient,
DefenderForStorageClient: &DefenderForStorageClient,
}
ServerVulnerabilityAssessmentSettingClient: ServerVulnerabilityAssessmentSettingClient,
DefenderForStorageClient: DefenderForStorageClient,
}, nil
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 04eb175

Please sign in to comment.