diff --git a/services/preview/security/mgmt/v3.0/security/alerts.go b/services/preview/security/mgmt/v3.0/security/alerts.go index 7b6f2a156e83..4e76a7c0cce1 100644 --- a/services/preview/security/mgmt/v3.0/security/alerts.go +++ b/services/preview/security/mgmt/v3.0/security/alerts.go @@ -42,14 +42,14 @@ func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocati return AlertsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } -// GetResourceGroupLevel get an alert that is associated a resource group or a resource in a resource group +// GetResourceGroupLevelAlerts get an alert that is associated a resource group or a resource in a resource group // Parameters: // alertName - name of the alert object // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) GetResourceGroupLevel(ctx context.Context, alertName string, resourceGroupName string) (result Alert, err error) { +func (client AlertsClient) GetResourceGroupLevelAlerts(ctx context.Context, alertName string, resourceGroupName string) (result Alert, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.GetResourceGroupLevel") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.GetResourceGroupLevelAlerts") defer func() { sc := -1 if result.Response.Response != nil { @@ -65,32 +65,32 @@ func (client AlertsClient) GetResourceGroupLevel(ctx context.Context, alertName Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "GetResourceGroupLevel", err.Error()) + return result, validation.NewError("security.AlertsClient", "GetResourceGroupLevelAlerts", err.Error()) } - req, err := client.GetResourceGroupLevelPreparer(ctx, alertName, resourceGroupName) + req, err := client.GetResourceGroupLevelAlertsPreparer(ctx, alertName, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetResourceGroupLevel", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetResourceGroupLevelAlerts", nil, "Failure preparing request") return } - resp, err := client.GetResourceGroupLevelSender(req) + resp, err := client.GetResourceGroupLevelAlertsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetResourceGroupLevel", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetResourceGroupLevelAlerts", resp, "Failure sending request") return } - result, err = client.GetResourceGroupLevelResponder(resp) + result, err = client.GetResourceGroupLevelAlertsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetResourceGroupLevel", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetResourceGroupLevelAlerts", resp, "Failure responding to request") } return } -// GetResourceGroupLevelPreparer prepares the GetResourceGroupLevel request. -func (client AlertsClient) GetResourceGroupLevelPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { +// GetResourceGroupLevelAlertsPreparer prepares the GetResourceGroupLevelAlerts request. +func (client AlertsClient) GetResourceGroupLevelAlertsPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "alertName": autorest.Encode("path", alertName), "ascLocation": autorest.Encode("path", client.AscLocation), @@ -111,15 +111,15 @@ func (client AlertsClient) GetResourceGroupLevelPreparer(ctx context.Context, al return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetResourceGroupLevelSender sends the GetResourceGroupLevel request. The method will close the +// GetResourceGroupLevelAlertsSender sends the GetResourceGroupLevelAlerts request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) GetResourceGroupLevelSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) GetResourceGroupLevelAlertsSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetResourceGroupLevelResponder handles the response to the GetResourceGroupLevel request. The method always +// GetResourceGroupLevelAlertsResponder handles the response to the GetResourceGroupLevelAlerts request. The method always // closes the http.Response Body. -func (client AlertsClient) GetResourceGroupLevelResponder(resp *http.Response) (result Alert, err error) { +func (client AlertsClient) GetResourceGroupLevelAlertsResponder(resp *http.Response) (result Alert, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -129,12 +129,12 @@ func (client AlertsClient) GetResourceGroupLevelResponder(resp *http.Response) ( return } -// GetSubscriptionLevel get an alert that is associated with a subscription +// GetSubscriptionLevelAlert get an alert that is associated with a subscription // Parameters: // alertName - name of the alert object -func (client AlertsClient) GetSubscriptionLevel(ctx context.Context, alertName string) (result Alert, err error) { +func (client AlertsClient) GetSubscriptionLevelAlert(ctx context.Context, alertName string) (result Alert, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.GetSubscriptionLevel") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.GetSubscriptionLevelAlert") defer func() { sc := -1 if result.Response.Response != nil { @@ -146,32 +146,32 @@ func (client AlertsClient) GetSubscriptionLevel(ctx context.Context, alertName s if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "GetSubscriptionLevel", err.Error()) + return result, validation.NewError("security.AlertsClient", "GetSubscriptionLevelAlert", err.Error()) } - req, err := client.GetSubscriptionLevelPreparer(ctx, alertName) + req, err := client.GetSubscriptionLevelAlertPreparer(ctx, alertName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetSubscriptionLevel", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetSubscriptionLevelAlert", nil, "Failure preparing request") return } - resp, err := client.GetSubscriptionLevelSender(req) + resp, err := client.GetSubscriptionLevelAlertSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetSubscriptionLevel", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetSubscriptionLevelAlert", resp, "Failure sending request") return } - result, err = client.GetSubscriptionLevelResponder(resp) + result, err = client.GetSubscriptionLevelAlertResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetSubscriptionLevel", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "GetSubscriptionLevelAlert", resp, "Failure responding to request") } return } -// GetSubscriptionLevelPreparer prepares the GetSubscriptionLevel request. -func (client AlertsClient) GetSubscriptionLevelPreparer(ctx context.Context, alertName string) (*http.Request, error) { +// GetSubscriptionLevelAlertPreparer prepares the GetSubscriptionLevelAlert request. +func (client AlertsClient) GetSubscriptionLevelAlertPreparer(ctx context.Context, alertName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "alertName": autorest.Encode("path", alertName), "ascLocation": autorest.Encode("path", client.AscLocation), @@ -191,15 +191,15 @@ func (client AlertsClient) GetSubscriptionLevelPreparer(ctx context.Context, ale return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSubscriptionLevelSender sends the GetSubscriptionLevel request. The method will close the +// GetSubscriptionLevelAlertSender sends the GetSubscriptionLevelAlert request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) GetSubscriptionLevelSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) GetSubscriptionLevelAlertSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// GetSubscriptionLevelResponder handles the response to the GetSubscriptionLevel request. The method always +// GetSubscriptionLevelAlertResponder handles the response to the GetSubscriptionLevelAlert request. The method always // closes the http.Response Body. -func (client AlertsClient) GetSubscriptionLevelResponder(resp *http.Response) (result Alert, err error) { +func (client AlertsClient) GetSubscriptionLevelAlertResponder(resp *http.Response) (result Alert, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -451,14 +451,14 @@ func (client AlertsClient) ListByResourceGroupComplete(ctx context.Context, reso return } -// ListResourceGroupLevelByRegion list all the alerts that are associated with the resource group that are stored in a -// specific location +// ListResourceGroupLevelAlertsByRegion list all the alerts that are associated with the resource group that are stored +// in a specific location // Parameters: // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) ListResourceGroupLevelByRegion(ctx context.Context, resourceGroupName string) (result AlertListPage, err error) { +func (client AlertsClient) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string) (result AlertListPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListResourceGroupLevelByRegion") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListResourceGroupLevelAlertsByRegion") defer func() { sc := -1 if result.al.Response.Response != nil { @@ -474,26 +474,26 @@ func (client AlertsClient) ListResourceGroupLevelByRegion(ctx context.Context, r Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "ListResourceGroupLevelByRegion", err.Error()) + return result, validation.NewError("security.AlertsClient", "ListResourceGroupLevelAlertsByRegion", err.Error()) } - result.fn = client.listResourceGroupLevelByRegionNextResults - req, err := client.ListResourceGroupLevelByRegionPreparer(ctx, resourceGroupName) + result.fn = client.listResourceGroupLevelAlertsByRegionNextResults + req, err := client.ListResourceGroupLevelAlertsByRegionPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListResourceGroupLevelByRegion", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListResourceGroupLevelAlertsByRegion", nil, "Failure preparing request") return } - resp, err := client.ListResourceGroupLevelByRegionSender(req) + resp, err := client.ListResourceGroupLevelAlertsByRegionSender(req) if err != nil { result.al.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListResourceGroupLevelByRegion", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListResourceGroupLevelAlertsByRegion", resp, "Failure sending request") return } - result.al, err = client.ListResourceGroupLevelByRegionResponder(resp) + result.al, err = client.ListResourceGroupLevelAlertsByRegionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListResourceGroupLevelByRegion", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListResourceGroupLevelAlertsByRegion", resp, "Failure responding to request") } if result.al.hasNextLink() && result.al.IsEmpty() { err = result.NextWithContext(ctx) @@ -502,8 +502,8 @@ func (client AlertsClient) ListResourceGroupLevelByRegion(ctx context.Context, r return } -// ListResourceGroupLevelByRegionPreparer prepares the ListResourceGroupLevelByRegion request. -func (client AlertsClient) ListResourceGroupLevelByRegionPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { +// ListResourceGroupLevelAlertsByRegionPreparer prepares the ListResourceGroupLevelAlertsByRegion request. +func (client AlertsClient) ListResourceGroupLevelAlertsByRegionPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "ascLocation": autorest.Encode("path", client.AscLocation), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -523,15 +523,15 @@ func (client AlertsClient) ListResourceGroupLevelByRegionPreparer(ctx context.Co return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListResourceGroupLevelByRegionSender sends the ListResourceGroupLevelByRegion request. The method will close the +// ListResourceGroupLevelAlertsByRegionSender sends the ListResourceGroupLevelAlertsByRegion request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) ListResourceGroupLevelByRegionSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) ListResourceGroupLevelAlertsByRegionSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListResourceGroupLevelByRegionResponder handles the response to the ListResourceGroupLevelByRegion request. The method always +// ListResourceGroupLevelAlertsByRegionResponder handles the response to the ListResourceGroupLevelAlertsByRegion request. The method always // closes the http.Response Body. -func (client AlertsClient) ListResourceGroupLevelByRegionResponder(resp *http.Response) (result AlertList, err error) { +func (client AlertsClient) ListResourceGroupLevelAlertsByRegionResponder(resp *http.Response) (result AlertList, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -541,31 +541,31 @@ func (client AlertsClient) ListResourceGroupLevelByRegionResponder(resp *http.Re return } -// listResourceGroupLevelByRegionNextResults retrieves the next set of results, if any. -func (client AlertsClient) listResourceGroupLevelByRegionNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) { +// listResourceGroupLevelAlertsByRegionNextResults retrieves the next set of results, if any. +func (client AlertsClient) listResourceGroupLevelAlertsByRegionNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) { req, err := lastResults.alertListPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelByRegionNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelAlertsByRegionNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListResourceGroupLevelByRegionSender(req) + resp, err := client.ListResourceGroupLevelAlertsByRegionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelByRegionNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelAlertsByRegionNextResults", resp, "Failure sending next results request") } - result, err = client.ListResourceGroupLevelByRegionResponder(resp) + result, err = client.ListResourceGroupLevelAlertsByRegionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelByRegionNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelAlertsByRegionNextResults", resp, "Failure responding to next results request") } return } -// ListResourceGroupLevelByRegionComplete enumerates all values, automatically crossing page boundaries as required. -func (client AlertsClient) ListResourceGroupLevelByRegionComplete(ctx context.Context, resourceGroupName string) (result AlertListIterator, err error) { +// ListResourceGroupLevelAlertsByRegionComplete enumerates all values, automatically crossing page boundaries as required. +func (client AlertsClient) ListResourceGroupLevelAlertsByRegionComplete(ctx context.Context, resourceGroupName string) (result AlertListIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListResourceGroupLevelByRegion") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListResourceGroupLevelAlertsByRegion") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -574,15 +574,15 @@ func (client AlertsClient) ListResourceGroupLevelByRegionComplete(ctx context.Co tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListResourceGroupLevelByRegion(ctx, resourceGroupName) + result.page, err = client.ListResourceGroupLevelAlertsByRegion(ctx, resourceGroupName) return } -// ListSubscriptionLevelByRegion list all the alerts that are associated with the subscription that are stored in a -// specific location -func (client AlertsClient) ListSubscriptionLevelByRegion(ctx context.Context) (result AlertListPage, err error) { +// ListSubscriptionLevelAlertsByRegion list all the alerts that are associated with the subscription that are stored in +// a specific location +func (client AlertsClient) ListSubscriptionLevelAlertsByRegion(ctx context.Context) (result AlertListPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListSubscriptionLevelByRegion") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListSubscriptionLevelAlertsByRegion") defer func() { sc := -1 if result.al.Response.Response != nil { @@ -594,26 +594,26 @@ func (client AlertsClient) ListSubscriptionLevelByRegion(ctx context.Context) (r if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "ListSubscriptionLevelByRegion", err.Error()) + return result, validation.NewError("security.AlertsClient", "ListSubscriptionLevelAlertsByRegion", err.Error()) } - result.fn = client.listSubscriptionLevelByRegionNextResults - req, err := client.ListSubscriptionLevelByRegionPreparer(ctx) + result.fn = client.listSubscriptionLevelAlertsByRegionNextResults + req, err := client.ListSubscriptionLevelAlertsByRegionPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListSubscriptionLevelByRegion", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListSubscriptionLevelAlertsByRegion", nil, "Failure preparing request") return } - resp, err := client.ListSubscriptionLevelByRegionSender(req) + resp, err := client.ListSubscriptionLevelAlertsByRegionSender(req) if err != nil { result.al.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListSubscriptionLevelByRegion", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListSubscriptionLevelAlertsByRegion", resp, "Failure sending request") return } - result.al, err = client.ListSubscriptionLevelByRegionResponder(resp) + result.al, err = client.ListSubscriptionLevelAlertsByRegionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListSubscriptionLevelByRegion", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "ListSubscriptionLevelAlertsByRegion", resp, "Failure responding to request") } if result.al.hasNextLink() && result.al.IsEmpty() { err = result.NextWithContext(ctx) @@ -622,8 +622,8 @@ func (client AlertsClient) ListSubscriptionLevelByRegion(ctx context.Context) (r return } -// ListSubscriptionLevelByRegionPreparer prepares the ListSubscriptionLevelByRegion request. -func (client AlertsClient) ListSubscriptionLevelByRegionPreparer(ctx context.Context) (*http.Request, error) { +// ListSubscriptionLevelAlertsByRegionPreparer prepares the ListSubscriptionLevelAlertsByRegion request. +func (client AlertsClient) ListSubscriptionLevelAlertsByRegionPreparer(ctx context.Context) (*http.Request, error) { pathParameters := map[string]interface{}{ "ascLocation": autorest.Encode("path", client.AscLocation), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -642,15 +642,15 @@ func (client AlertsClient) ListSubscriptionLevelByRegionPreparer(ctx context.Con return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSubscriptionLevelByRegionSender sends the ListSubscriptionLevelByRegion request. The method will close the +// ListSubscriptionLevelAlertsByRegionSender sends the ListSubscriptionLevelAlertsByRegion request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) ListSubscriptionLevelByRegionSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) ListSubscriptionLevelAlertsByRegionSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListSubscriptionLevelByRegionResponder handles the response to the ListSubscriptionLevelByRegion request. The method always +// ListSubscriptionLevelAlertsByRegionResponder handles the response to the ListSubscriptionLevelAlertsByRegion request. The method always // closes the http.Response Body. -func (client AlertsClient) ListSubscriptionLevelByRegionResponder(resp *http.Response) (result AlertList, err error) { +func (client AlertsClient) ListSubscriptionLevelAlertsByRegionResponder(resp *http.Response) (result AlertList, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), @@ -660,31 +660,31 @@ func (client AlertsClient) ListSubscriptionLevelByRegionResponder(resp *http.Res return } -// listSubscriptionLevelByRegionNextResults retrieves the next set of results, if any. -func (client AlertsClient) listSubscriptionLevelByRegionNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) { +// listSubscriptionLevelAlertsByRegionNextResults retrieves the next set of results, if any. +func (client AlertsClient) listSubscriptionLevelAlertsByRegionNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) { req, err := lastResults.alertListPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelByRegionNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelAlertsByRegionNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListSubscriptionLevelByRegionSender(req) + resp, err := client.ListSubscriptionLevelAlertsByRegionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelByRegionNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelAlertsByRegionNextResults", resp, "Failure sending next results request") } - result, err = client.ListSubscriptionLevelByRegionResponder(resp) + result, err = client.ListSubscriptionLevelAlertsByRegionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelByRegionNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelAlertsByRegionNextResults", resp, "Failure responding to next results request") } return } -// ListSubscriptionLevelByRegionComplete enumerates all values, automatically crossing page boundaries as required. -func (client AlertsClient) ListSubscriptionLevelByRegionComplete(ctx context.Context) (result AlertListIterator, err error) { +// ListSubscriptionLevelAlertsByRegionComplete enumerates all values, automatically crossing page boundaries as required. +func (client AlertsClient) ListSubscriptionLevelAlertsByRegionComplete(ctx context.Context) (result AlertListIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListSubscriptionLevelByRegion") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListSubscriptionLevelAlertsByRegion") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -693,18 +693,18 @@ func (client AlertsClient) ListSubscriptionLevelByRegionComplete(ctx context.Con tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListSubscriptionLevelByRegion(ctx) + result.page, err = client.ListSubscriptionLevelAlertsByRegion(ctx) return } -// UpdateResourceGroupLevelStateToActivate update the alert's state +// UpdateResourceGroupLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) UpdateResourceGroupLevelStateToActivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelStateToActivate") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -720,32 +720,32 @@ func (client AlertsClient) UpdateResourceGroupLevelStateToActivate(ctx context.C Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelStateToActivate", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateResourceGroupLevelStateToActivatePreparer(ctx, alertName, resourceGroupName) + req, err := client.UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx, alertName, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelStateToActivate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateResourceGroupLevelStateToActivateSender(req) + resp, err := client.UpdateResourceGroupLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelStateToActivate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateResourceGroupLevelStateToActivateResponder(resp) + result, err = client.UpdateResourceGroupLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelStateToActivate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateResourceGroupLevelStateToActivatePreparer prepares the UpdateResourceGroupLevelStateToActivate request. -func (client AlertsClient) UpdateResourceGroupLevelStateToActivatePreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { +// UpdateResourceGroupLevelAlertStateToDismissPreparer prepares the UpdateResourceGroupLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "alertName": autorest.Encode("path", alertName), "ascLocation": autorest.Encode("path", client.AscLocation), @@ -761,20 +761,20 @@ func (client AlertsClient) UpdateResourceGroupLevelStateToActivatePreparer(ctx c preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateResourceGroupLevelStateToActivateSender sends the UpdateResourceGroupLevelStateToActivate request. The method will close the +// UpdateResourceGroupLevelAlertStateToDismissSender sends the UpdateResourceGroupLevelAlertStateToDismiss request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateResourceGroupLevelStateToActivateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// UpdateResourceGroupLevelStateToActivateResponder handles the response to the UpdateResourceGroupLevelStateToActivate request. The method always +// UpdateResourceGroupLevelAlertStateToDismissResponder handles the response to the UpdateResourceGroupLevelAlertStateToDismiss request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateResourceGroupLevelStateToActivateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -783,14 +783,14 @@ func (client AlertsClient) UpdateResourceGroupLevelStateToActivateResponder(resp return } -// UpdateResourceGroupLevelStateToDismiss update the alert's state +// UpdateResourceGroupLevelAlertStateToReactivate update the alert's state // Parameters: // alertName - name of the alert object // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) UpdateResourceGroupLevelStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelStateToDismiss") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToReactivate") defer func() { sc := -1 if result.Response != nil { @@ -806,32 +806,32 @@ func (client AlertsClient) UpdateResourceGroupLevelStateToDismiss(ctx context.Co Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelStateToDismiss", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", err.Error()) } - req, err := client.UpdateResourceGroupLevelStateToDismissPreparer(ctx, alertName, resourceGroupName) + req, err := client.UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx, alertName, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelStateToDismiss", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", nil, "Failure preparing request") return } - resp, err := client.UpdateResourceGroupLevelStateToDismissSender(req) + resp, err := client.UpdateResourceGroupLevelAlertStateToReactivateSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelStateToDismiss", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure sending request") return } - result, err = client.UpdateResourceGroupLevelStateToDismissResponder(resp) + result, err = client.UpdateResourceGroupLevelAlertStateToReactivateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelStateToDismiss", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure responding to request") } return } -// UpdateResourceGroupLevelStateToDismissPreparer prepares the UpdateResourceGroupLevelStateToDismiss request. -func (client AlertsClient) UpdateResourceGroupLevelStateToDismissPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { +// UpdateResourceGroupLevelAlertStateToReactivatePreparer prepares the UpdateResourceGroupLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "alertName": autorest.Encode("path", alertName), "ascLocation": autorest.Encode("path", client.AscLocation), @@ -847,20 +847,20 @@ func (client AlertsClient) UpdateResourceGroupLevelStateToDismissPreparer(ctx co preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateResourceGroupLevelStateToDismissSender sends the UpdateResourceGroupLevelStateToDismiss request. The method will close the +// UpdateResourceGroupLevelAlertStateToReactivateSender sends the UpdateResourceGroupLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateResourceGroupLevelStateToDismissSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// UpdateResourceGroupLevelStateToDismissResponder handles the response to the UpdateResourceGroupLevelStateToDismiss request. The method always +// UpdateResourceGroupLevelAlertStateToReactivateResponder handles the response to the UpdateResourceGroupLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateResourceGroupLevelStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -955,12 +955,12 @@ func (client AlertsClient) UpdateResourceGroupLevelStateToResolveResponder(resp return } -// UpdateSubscriptionLevelStateToActivate update the alert's state +// UpdateSubscriptionLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -func (client AlertsClient) UpdateSubscriptionLevelStateToActivate(ctx context.Context, alertName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelStateToActivate") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -972,32 +972,32 @@ func (client AlertsClient) UpdateSubscriptionLevelStateToActivate(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelStateToActivate", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateSubscriptionLevelStateToActivatePreparer(ctx, alertName) + req, err := client.UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx, alertName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelStateToActivate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateSubscriptionLevelStateToActivateSender(req) + resp, err := client.UpdateSubscriptionLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelStateToActivate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateSubscriptionLevelStateToActivateResponder(resp) + result, err = client.UpdateSubscriptionLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelStateToActivate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateSubscriptionLevelStateToActivatePreparer prepares the UpdateSubscriptionLevelStateToActivate request. -func (client AlertsClient) UpdateSubscriptionLevelStateToActivatePreparer(ctx context.Context, alertName string) (*http.Request, error) { +// UpdateSubscriptionLevelAlertStateToDismissPreparer prepares the UpdateSubscriptionLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx context.Context, alertName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "alertName": autorest.Encode("path", alertName), "ascLocation": autorest.Encode("path", client.AscLocation), @@ -1012,20 +1012,20 @@ func (client AlertsClient) UpdateSubscriptionLevelStateToActivatePreparer(ctx co preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSubscriptionLevelStateToActivateSender sends the UpdateSubscriptionLevelStateToActivate request. The method will close the +// UpdateSubscriptionLevelAlertStateToDismissSender sends the UpdateSubscriptionLevelAlertStateToDismiss request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateSubscriptionLevelStateToActivateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// UpdateSubscriptionLevelStateToActivateResponder handles the response to the UpdateSubscriptionLevelStateToActivate request. The method always +// UpdateSubscriptionLevelAlertStateToDismissResponder handles the response to the UpdateSubscriptionLevelAlertStateToDismiss request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateSubscriptionLevelStateToActivateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), @@ -1034,12 +1034,12 @@ func (client AlertsClient) UpdateSubscriptionLevelStateToActivateResponder(resp return } -// UpdateSubscriptionLevelStateToDismiss update the alert's state +// UpdateSubscriptionLevelAlertStateToReactivate update the alert's state // Parameters: // alertName - name of the alert object -func (client AlertsClient) UpdateSubscriptionLevelStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelStateToDismiss") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToReactivate") defer func() { sc := -1 if result.Response != nil { @@ -1051,32 +1051,32 @@ func (client AlertsClient) UpdateSubscriptionLevelStateToDismiss(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelStateToDismiss", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", err.Error()) } - req, err := client.UpdateSubscriptionLevelStateToDismissPreparer(ctx, alertName) + req, err := client.UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx, alertName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelStateToDismiss", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", nil, "Failure preparing request") return } - resp, err := client.UpdateSubscriptionLevelStateToDismissSender(req) + resp, err := client.UpdateSubscriptionLevelAlertStateToReactivateSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelStateToDismiss", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure sending request") return } - result, err = client.UpdateSubscriptionLevelStateToDismissResponder(resp) + result, err = client.UpdateSubscriptionLevelAlertStateToReactivateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelStateToDismiss", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure responding to request") } return } -// UpdateSubscriptionLevelStateToDismissPreparer prepares the UpdateSubscriptionLevelStateToDismiss request. -func (client AlertsClient) UpdateSubscriptionLevelStateToDismissPreparer(ctx context.Context, alertName string) (*http.Request, error) { +// UpdateSubscriptionLevelAlertStateToReactivatePreparer prepares the UpdateSubscriptionLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "alertName": autorest.Encode("path", alertName), "ascLocation": autorest.Encode("path", client.AscLocation), @@ -1091,20 +1091,20 @@ func (client AlertsClient) UpdateSubscriptionLevelStateToDismissPreparer(ctx con preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSubscriptionLevelStateToDismissSender sends the UpdateSubscriptionLevelStateToDismiss request. The method will close the +// UpdateSubscriptionLevelAlertStateToReactivateSender sends the UpdateSubscriptionLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateSubscriptionLevelStateToDismissSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// UpdateSubscriptionLevelStateToDismissResponder handles the response to the UpdateSubscriptionLevelStateToDismiss request. The method always +// UpdateSubscriptionLevelAlertStateToReactivateResponder handles the response to the UpdateSubscriptionLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateSubscriptionLevelStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), diff --git a/services/preview/security/mgmt/v3.0/security/device.go b/services/preview/security/mgmt/v3.0/security/device.go new file mode 100644 index 000000000000..6aeda8f4cc42 --- /dev/null +++ b/services/preview/security/mgmt/v3.0/security/device.go @@ -0,0 +1,116 @@ +package security + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DeviceClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type DeviceClient struct { + BaseClient +} + +// NewDeviceClient creates an instance of the DeviceClient client. +func NewDeviceClient(subscriptionID string, ascLocation string) DeviceClient { + return NewDeviceClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewDeviceClientWithBaseURI creates an instance of the DeviceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDeviceClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DeviceClient { + return DeviceClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// Get get device. +// Parameters: +// resourceID - the identifier of the resource. +// deviceID - identifier of the device. +func (client DeviceClient) Get(ctx context.Context, resourceID string, deviceID string) (result Device, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeviceClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceID, deviceID) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DeviceClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.DeviceClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DeviceClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DeviceClient) GetPreparer(ctx context.Context, resourceID string, deviceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deviceId": autorest.Encode("path", deviceID), + "resourceId": resourceID, + } + + const APIVersion = "2020-08-06-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/devices/{deviceId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DeviceClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DeviceClient) GetResponder(resp *http.Response) (result Device, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/security/mgmt/v3.0/security/devicesforhub.go b/services/preview/security/mgmt/v3.0/security/devicesforhub.go new file mode 100644 index 000000000000..99cca3e97110 --- /dev/null +++ b/services/preview/security/mgmt/v3.0/security/devicesforhub.go @@ -0,0 +1,167 @@ +package security + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DevicesForHubClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type DevicesForHubClient struct { + BaseClient +} + +// NewDevicesForHubClient creates an instance of the DevicesForHubClient client. +func NewDevicesForHubClient(subscriptionID string, ascLocation string) DevicesForHubClient { + return NewDevicesForHubClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewDevicesForHubClientWithBaseURI creates an instance of the DevicesForHubClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDevicesForHubClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DevicesForHubClient { + return DevicesForHubClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// List get list of the devices for the specified IoT Hub resource. +// Parameters: +// resourceID - the identifier of the resource. +// limit - limit the number of items returned in a single page +// skipToken - skip token used for pagination +// deviceManagementType - get devices only from specific type, Managed or Unmanaged. +func (client DevicesForHubClient) List(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForHubClient.List") + defer func() { + sc := -1 + if result.dl.Response.Response != nil { + sc = result.dl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceID, limit, skipToken, deviceManagementType) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "List", resp, "Failure sending request") + return + } + + result.dl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "List", resp, "Failure responding to request") + } + if result.dl.hasNextLink() && result.dl.IsEmpty() { + err = result.NextWithContext(ctx) + } + + return +} + +// ListPreparer prepares the List request. +func (client DevicesForHubClient) ListPreparer(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType ManagementState) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceId": resourceID, + } + + const APIVersion = "2020-08-06-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if limit != nil { + queryParameters["$limit"] = autorest.Encode("query", *limit) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + if len(string(deviceManagementType)) > 0 { + queryParameters["deviceManagementType"] = autorest.Encode("query", deviceManagementType) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/devices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DevicesForHubClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DevicesForHubClient) ListResponder(resp *http.Response) (result DeviceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client DevicesForHubClient) listNextResults(ctx context.Context, lastResults DeviceList) (result DeviceList, err error) { + req, err := lastResults.deviceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.DevicesForHubClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.DevicesForHubClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DevicesForHubClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DevicesForHubClient) ListComplete(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForHubClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceID, limit, skipToken, deviceManagementType) + return +} diff --git a/services/preview/security/mgmt/v3.0/security/devicesforsubscription.go b/services/preview/security/mgmt/v3.0/security/devicesforsubscription.go new file mode 100644 index 000000000000..3f37062e011f --- /dev/null +++ b/services/preview/security/mgmt/v3.0/security/devicesforsubscription.go @@ -0,0 +1,174 @@ +package security + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DevicesForSubscriptionClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type DevicesForSubscriptionClient struct { + BaseClient +} + +// NewDevicesForSubscriptionClient creates an instance of the DevicesForSubscriptionClient client. +func NewDevicesForSubscriptionClient(subscriptionID string, ascLocation string) DevicesForSubscriptionClient { + return NewDevicesForSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewDevicesForSubscriptionClientWithBaseURI creates an instance of the DevicesForSubscriptionClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewDevicesForSubscriptionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DevicesForSubscriptionClient { + return DevicesForSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// List get list of the devices by their subscription. +// Parameters: +// limit - limit the number of items returned in a single page +// skipToken - skip token used for pagination +// deviceManagementType - get devices only from specific type, Managed or Unmanaged. +func (client DevicesForSubscriptionClient) List(ctx context.Context, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForSubscriptionClient.List") + defer func() { + sc := -1 + if result.dl.Response.Response != nil { + sc = result.dl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.DevicesForSubscriptionClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, limit, skipToken, deviceManagementType) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "List", resp, "Failure sending request") + return + } + + result.dl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "List", resp, "Failure responding to request") + } + if result.dl.hasNextLink() && result.dl.IsEmpty() { + err = result.NextWithContext(ctx) + } + + return +} + +// ListPreparer prepares the List request. +func (client DevicesForSubscriptionClient) ListPreparer(ctx context.Context, limit *int32, skipToken string, deviceManagementType ManagementState) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-08-06-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if limit != nil { + queryParameters["$limit"] = autorest.Encode("query", *limit) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + if len(string(deviceManagementType)) > 0 { + queryParameters["deviceManagementType"] = autorest.Encode("query", deviceManagementType) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/devices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DevicesForSubscriptionClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DevicesForSubscriptionClient) ListResponder(resp *http.Response) (result DeviceList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client DevicesForSubscriptionClient) listNextResults(ctx context.Context, lastResults DeviceList) (result DeviceList, err error) { + req, err := lastResults.deviceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.DevicesForSubscriptionClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DevicesForSubscriptionClient) ListComplete(ctx context.Context, limit *int32, skipToken string, deviceManagementType ManagementState) (result DeviceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DevicesForSubscriptionClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, limit, skipToken, deviceManagementType) + return +} diff --git a/services/preview/security/mgmt/v3.0/security/enums.go b/services/preview/security/mgmt/v3.0/security/enums.go index 34e9b3e51a97..0d121741383e 100644 --- a/services/preview/security/mgmt/v3.0/security/enums.go +++ b/services/preview/security/mgmt/v3.0/security/enums.go @@ -274,6 +274,21 @@ func PossibleAuthenticationTypeValues() []AuthenticationType { return []AuthenticationType{AuthenticationTypeAuthenticationDetailsProperties, AuthenticationTypeAwsAssumeRole, AuthenticationTypeAwsCreds, AuthenticationTypeGcpCredentials} } +// AuthorizationState enumerates the values for authorization state. +type AuthorizationState string + +const ( + // Authorized ... + Authorized AuthorizationState = "Authorized" + // Unauthorized ... + Unauthorized AuthorizationState = "Unauthorized" +) + +// PossibleAuthorizationStateValues returns an array of possible values for the AuthorizationState const type. +func PossibleAuthorizationStateValues() []AuthorizationState { + return []AuthorizationState{Authorized, Unauthorized} +} + // AutoProvision enumerates the values for auto provision. type AutoProvision string @@ -416,6 +431,36 @@ func PossibleDataSourceValues() []DataSource { return []DataSource{TwinData} } +// DeviceCriticality enumerates the values for device criticality. +type DeviceCriticality string + +const ( + // Important ... + Important DeviceCriticality = "Important" + // Standard ... + Standard DeviceCriticality = "Standard" +) + +// PossibleDeviceCriticalityValues returns an array of possible values for the DeviceCriticality const type. +func PossibleDeviceCriticalityValues() []DeviceCriticality { + return []DeviceCriticality{Important, Standard} +} + +// DeviceStatus enumerates the values for device status. +type DeviceStatus string + +const ( + // DeviceStatusActive ... + DeviceStatusActive DeviceStatus = "Active" + // DeviceStatusRemoved ... + DeviceStatusRemoved DeviceStatus = "Removed" +) + +// PossibleDeviceStatusValues returns an array of possible values for the DeviceStatus const type. +func PossibleDeviceStatusValues() []DeviceStatus { + return []DeviceStatus{DeviceStatusActive, DeviceStatusRemoved} +} + // Direction enumerates the values for direction. type Direction string @@ -773,6 +818,36 @@ func PossibleKindEnum1Values() []KindEnum1 { return []KindEnum1{KindAAD, KindATA, KindCEF, KindExternalSecuritySolution} } +// MacSignificance enumerates the values for mac significance. +type MacSignificance string + +const ( + // Primary ... + Primary MacSignificance = "Primary" + // Secondary ... + Secondary MacSignificance = "Secondary" +) + +// PossibleMacSignificanceValues returns an array of possible values for the MacSignificance const type. +func PossibleMacSignificanceValues() []MacSignificance { + return []MacSignificance{Primary, Secondary} +} + +// ManagementState enumerates the values for management state. +type ManagementState string + +const ( + // Managed ... + Managed ManagementState = "Managed" + // Unmanaged ... + Unmanaged ManagementState = "Unmanaged" +) + +// PossibleManagementStateValues returns an array of possible values for the ManagementState const type. +func PossibleManagementStateValues() []ManagementState { + return []ManagementState{Managed, Unmanaged} +} + // Msi enumerates the values for msi. type Msi string @@ -843,15 +918,30 @@ func PossiblePermissionPropertyValues() []PermissionProperty { type PricingTier string const ( - // Free Get free Azure security center experience with basic security features - Free PricingTier = "Free" - // Standard Get the standard Azure security center experience with advanced security features - Standard PricingTier = "Standard" + // PricingTierFree Get free Azure security center experience with basic security features + PricingTierFree PricingTier = "Free" + // PricingTierStandard Get the standard Azure security center experience with advanced security features + PricingTierStandard PricingTier = "Standard" ) // PossiblePricingTierValues returns an array of possible values for the PricingTier const type. func PossiblePricingTierValues() []PricingTier { - return []PricingTier{Free, Standard} + return []PricingTier{PricingTierFree, PricingTierStandard} +} + +// ProgrammingState enumerates the values for programming state. +type ProgrammingState string + +const ( + // NotProgrammingDevice ... + NotProgrammingDevice ProgrammingState = "NotProgrammingDevice" + // ProgrammingDevice ... + ProgrammingDevice ProgrammingState = "ProgrammingDevice" +) + +// PossibleProgrammingStateValues returns an array of possible values for the ProgrammingState const type. +func PossibleProgrammingStateValues() []ProgrammingState { + return []ProgrammingState{NotProgrammingDevice, ProgrammingDevice} } // PropertyType enumerates the values for property type. @@ -928,6 +1018,23 @@ func PossibleProvisioningState1Values() []ProvisioningState1 { return []ProvisioningState1{ProvisioningState1Canceled, ProvisioningState1Deprovisioning, ProvisioningState1Failed, ProvisioningState1Provisioning, ProvisioningState1Succeeded} } +// PurdueLevel enumerates the values for purdue level. +type PurdueLevel string + +const ( + // Enterprise ... + Enterprise PurdueLevel = "Enterprise" + // ProcessControl ... + ProcessControl PurdueLevel = "ProcessControl" + // Supervisory ... + Supervisory PurdueLevel = "Supervisory" +) + +// PossiblePurdueLevelValues returns an array of possible values for the PurdueLevel const type. +func PossiblePurdueLevelValues() []PurdueLevel { + return []PurdueLevel{Enterprise, ProcessControl, Supervisory} +} + // Rank enumerates the values for rank. type Rank string @@ -1097,6 +1204,21 @@ func PossibleRecommendationTypeValues() []RecommendationType { return []RecommendationType{IoTACRAuthentication, IoTAgentSendsUnutilizedMessages, IoTBaseline, IoTEdgeHubMemOptimize, IoTEdgeLoggingOptions, IoTInconsistentModuleSettings, IoTInstallAgent, IoTIPFilterDenyAll, IoTIPFilterPermissiveRule, IoTOpenPorts, IoTPermissiveFirewallPolicy, IoTPermissiveInputFirewallRules, IoTPermissiveOutputFirewallRules, IoTPrivilegedDockerOptions, IoTSharedCredentials, IoTVulnerableTLSCipherSuite} } +// RelationToIPStatus enumerates the values for relation to ip status. +type RelationToIPStatus string + +const ( + // Certain ... + Certain RelationToIPStatus = "Certain" + // Guess ... + Guess RelationToIPStatus = "Guess" +) + +// PossibleRelationToIPStatusValues returns an array of possible values for the RelationToIPStatus const type. +func PossibleRelationToIPStatusValues() []RelationToIPStatus { + return []RelationToIPStatus{Certain, Guess} +} + // ReportedSeverity enumerates the values for reported severity. type ReportedSeverity string @@ -1213,6 +1335,21 @@ func PossibleRuleTypeValues() []RuleType { return []RuleType{RuleTypeActiveConnectionsNotInAllowedRange, RuleTypeAllowlistCustomAlertRule, RuleTypeAmqpC2DMessagesNotInAllowedRange, RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange, RuleTypeAmqpD2CMessagesNotInAllowedRange, RuleTypeConnectionToIPNotAllowed, RuleTypeCustomAlertRule, RuleTypeDenylistCustomAlertRule, RuleTypeDirectMethodInvokesNotInAllowedRange, RuleTypeFailedLocalLoginsNotInAllowedRange, RuleTypeFileUploadsNotInAllowedRange, RuleTypeHTTPC2DMessagesNotInAllowedRange, RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange, RuleTypeHTTPD2CMessagesNotInAllowedRange, RuleTypeListCustomAlertRule, RuleTypeLocalUserNotAllowed, RuleTypeMqttC2DMessagesNotInAllowedRange, RuleTypeMqttC2DRejectedMessagesNotInAllowedRange, RuleTypeMqttD2CMessagesNotInAllowedRange, RuleTypeProcessNotAllowed, RuleTypeQueuePurgesNotInAllowedRange, RuleTypeThresholdCustomAlertRule, RuleTypeTimeWindowCustomAlertRule, RuleTypeTwinUpdatesNotInAllowedRange, RuleTypeUnauthorizedOperationsNotInAllowedRange} } +// ScanningFunctionality enumerates the values for scanning functionality. +type ScanningFunctionality string + +const ( + // NotScannerDevice ... + NotScannerDevice ScanningFunctionality = "NotScannerDevice" + // ScannerDevice ... + ScannerDevice ScanningFunctionality = "ScannerDevice" +) + +// PossibleScanningFunctionalityValues returns an array of possible values for the ScanningFunctionality const type. +func PossibleScanningFunctionalityValues() []ScanningFunctionality { + return []ScanningFunctionality{NotScannerDevice, ScannerDevice} +} + // Script enumerates the values for script. type Script string diff --git a/services/preview/security/mgmt/v3.0/security/models.go b/services/preview/security/mgmt/v3.0/security/models.go index 84532d78c22f..4a0273da4f4e 100644 --- a/services/preview/security/mgmt/v3.0/security/models.go +++ b/services/preview/security/mgmt/v3.0/security/models.go @@ -7150,6 +7150,325 @@ func (dcar DenylistCustomAlertRule) AsBasicCustomAlertRule() (BasicCustomAlertRu return &dcar, true } +// Device device model +type Device struct { + autorest.Response `json:"-"` + // DeviceProperties - Device data + *DeviceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Device. +func (d Device) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if d.DeviceProperties != nil { + objectMap["properties"] = d.DeviceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Device struct. +func (d *Device) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var deviceProperties DeviceProperties + err = json.Unmarshal(*v, &deviceProperties) + if err != nil { + return err + } + d.DeviceProperties = &deviceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + d.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + d.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + d.Type = &typeVar + } + } + } + + return nil +} + +// DeviceList list of Devices +type DeviceList struct { + autorest.Response `json:"-"` + // Value - List of devices + Value *[]Device `json:"value,omitempty"` + // NextLink - READ-ONLY; When there are too many devices for one page, use this URI to fetch the next page. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeviceList. +func (dl DeviceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dl.Value != nil { + objectMap["value"] = dl.Value + } + return json.Marshal(objectMap) +} + +// DeviceListIterator provides access to a complete listing of Device values. +type DeviceListIterator struct { + i int + page DeviceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *DeviceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeviceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *DeviceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DeviceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter DeviceListIterator) Response() DeviceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter DeviceListIterator) Value() Device { + if !iter.page.NotDone() { + return Device{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DeviceListIterator type. +func NewDeviceListIterator(page DeviceListPage) DeviceListIterator { + return DeviceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dl DeviceList) IsEmpty() bool { + return dl.Value == nil || len(*dl.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (dl DeviceList) hasNextLink() bool { + return dl.NextLink != nil && len(*dl.NextLink) != 0 +} + +// deviceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dl DeviceList) deviceListPreparer(ctx context.Context) (*http.Request, error) { + if !dl.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dl.NextLink))) +} + +// DeviceListPage contains a page of Device values. +type DeviceListPage struct { + fn func(context.Context, DeviceList) (DeviceList, error) + dl DeviceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DeviceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeviceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.dl) + if err != nil { + return err + } + page.dl = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DeviceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DeviceListPage) NotDone() bool { + return !page.dl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DeviceListPage) Response() DeviceList { + return page.dl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DeviceListPage) Values() []Device { + if page.dl.IsEmpty() { + return nil + } + return *page.dl.Value +} + +// Creates a new instance of the DeviceListPage type. +func NewDeviceListPage(getNextPage func(context.Context, DeviceList) (DeviceList, error)) DeviceListPage { + return DeviceListPage{fn: getNextPage} +} + +// DeviceProperties device Information +type DeviceProperties struct { + // DisplayName - Device display name given by the collector + DisplayName *string `json:"displayName,omitempty"` + // DeviceType - Device type. + DeviceType *string `json:"deviceType,omitempty"` + // SourceName - READ-ONLY; The source that created the device + SourceName *string `json:"sourceName,omitempty"` + // NetworkInterfaces - READ-ONLY; List of network interfaces. + NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` + // Vendor - READ-ONLY; Device vendor + Vendor *string `json:"vendor,omitempty"` + // OsName - Device operating system name. + OsName *string `json:"osName,omitempty"` + // Protocols - READ-ONLY; List of protocols. + Protocols *[]Protocol1 `json:"protocols,omitempty"` + // LastActiveTime - READ-ONLY; last time the device was active in the network + LastActiveTime *date.Time `json:"lastActiveTime,omitempty"` + // LastUpdateTime - READ-ONLY; last time the device was updated + LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` + // ManagementState - READ-ONLY; Managed state of the device. Possible values include: 'Managed', 'Unmanaged' + ManagementState ManagementState `json:"managementState,omitempty"` + // AuthorizationState - Authorized state of the device. Possible values include: 'Authorized', 'Unauthorized' + AuthorizationState AuthorizationState `json:"authorizationState,omitempty"` + // DeviceCriticality - Device criticality. Possible values include: 'Important', 'Standard' + DeviceCriticality DeviceCriticality `json:"deviceCriticality,omitempty"` + // PurdueLevel - Purdue level of the device. Possible values include: 'ProcessControl', 'Supervisory', 'Enterprise' + PurdueLevel PurdueLevel `json:"purdueLevel,omitempty"` + // Notes - user notes for the device, up to 300 characters. + Notes *string `json:"notes,omitempty"` + // Firmwares - READ-ONLY; List of device firmwares. + Firmwares *[]Firmware `json:"firmwares,omitempty"` + // DiscoveryTime - READ-ONLY; Discovered time of the device. + DiscoveryTime *date.Time `json:"discoveryTime,omitempty"` + // ProgrammingState - READ-ONLY; Indicates whether this device is programming. Possible values include: 'ProgrammingDevice', 'NotProgrammingDevice' + ProgrammingState ProgrammingState `json:"programmingState,omitempty"` + // LastProgrammingTime - READ-ONLY; last time the device was programming or programed. + LastProgrammingTime *date.Time `json:"lastProgrammingTime,omitempty"` + // ScanningFunctionality - READ-ONLY; Indicates whether the device is a scanner. Possible values include: 'ScannerDevice', 'NotScannerDevice' + ScanningFunctionality ScanningFunctionality `json:"scanningFunctionality,omitempty"` + // LastScanTime - READ-ONLY; last time the device was scanning. + LastScanTime *date.Time `json:"lastScanTime,omitempty"` + // RiskScore - READ-ONLY; risk score of the device. + RiskScore *int32 `json:"riskScore,omitempty"` + // SensorName - READ-ONLY; When the device is unmanaged, the sensor that scanned this device. + SensorName *string `json:"sensorName,omitempty"` + // SiteName - READ-ONLY; The sensor site name. + SiteName *string `json:"siteName,omitempty"` + // ZoneName - READ-ONLY; The sensor zone name. + ZoneName *string `json:"zoneName,omitempty"` + // DeviceStatus - READ-ONLY; Device status. Possible values include: 'DeviceStatusActive', 'DeviceStatusRemoved' + DeviceStatus DeviceStatus `json:"deviceStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeviceProperties. +func (dp DeviceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dp.DisplayName != nil { + objectMap["displayName"] = dp.DisplayName + } + if dp.DeviceType != nil { + objectMap["deviceType"] = dp.DeviceType + } + if dp.OsName != nil { + objectMap["osName"] = dp.OsName + } + if dp.AuthorizationState != "" { + objectMap["authorizationState"] = dp.AuthorizationState + } + if dp.DeviceCriticality != "" { + objectMap["deviceCriticality"] = dp.DeviceCriticality + } + if dp.PurdueLevel != "" { + objectMap["purdueLevel"] = dp.PurdueLevel + } + if dp.Notes != nil { + objectMap["notes"] = dp.Notes + } + return json.Marshal(objectMap) +} + // DeviceSecurityGroup the device security group resource type DeviceSecurityGroup struct { autorest.Response `json:"-"` @@ -8698,6 +9017,24 @@ func (funiar FileUploadsNotInAllowedRange) AsBasicCustomAlertRule() (BasicCustom return &funiar, true } +// Firmware firmware information +type Firmware struct { + // ModuleAddress - READ-ONLY; Address of the specific module a firmware is related to + ModuleAddress *string `json:"moduleAddress,omitempty"` + // Rack - READ-ONLY; Rack number of the module a firmware is related to. + Rack *string `json:"rack,omitempty"` + // Slot - READ-ONLY; Slot number in the rack of the module a firmware is related to + Slot *string `json:"slot,omitempty"` + // Serial - READ-ONLY; Serial of the firmware + Serial *string `json:"serial,omitempty"` + // Model - READ-ONLY; Firmware model + Model *string `json:"model,omitempty"` + // Version - READ-ONLY; Firmware version + Version *string `json:"version,omitempty"` + // AdditionalData - READ-ONLY; A bag of fields which extends the firmware information. + AdditionalData interface{} `json:"additionalData,omitempty"` +} + // GcpCredentialsDetailsProperties GCP cloud account connector based service to service credentials, the // credentials is composed of organization id and json api key (write only) type GcpCredentialsDetailsProperties struct { @@ -11572,6 +11909,20 @@ type IoTSeverityMetrics struct { Low *int32 `json:"low,omitempty"` } +// IPAddress IP Address information +type IPAddress struct { + // V4Address - READ-ONLY; IPV4 address + V4Address *string `json:"v4Address,omitempty"` + // DetectionTime - READ-ONLY; Detection time of the ip address. + DetectionTime *date.Time `json:"detectionTime,omitempty"` + // SubnetCidr - READ-ONLY; Subnet Classless Inter-Domain Routing + SubnetCidr *string `json:"subnetCidr,omitempty"` + // Fqdn - READ-ONLY; Fully qualified domain name + Fqdn *string `json:"fqdn,omitempty"` + // FqdnLastLookupTime - READ-ONLY; FQDN last lookup time. + FqdnLastLookupTime *date.Time `json:"fqdnLastLookupTime,omitempty"` +} + // JitNetworkAccessPoliciesList ... type JitNetworkAccessPoliciesList struct { autorest.Response `json:"-"` @@ -12418,6 +12769,18 @@ func (lai LogAnalyticsIdentifier) AsBasicResourceIdentifier() (BasicResourceIden return &lai, true } +// MacAddress MAC Address information +type MacAddress struct { + // Address - READ-ONLY; MAC address + Address *string `json:"address,omitempty"` + // DetectionTime - READ-ONLY; Detection time of the mac address. + DetectionTime *date.Time `json:"detectionTime,omitempty"` + // Significance - READ-ONLY; Indicates whether this is the primary secondary MAC address of the device. Possible values include: 'Primary', 'Secondary' + Significance MacSignificance `json:"significance,omitempty"` + // RelationToIPStatus - READ-ONLY; Indicates whether the relation of the mac to the ip address is certain or a guess. Possible values include: 'Guess', 'Certain' + RelationToIPStatus RelationToIPStatus `json:"relationToIpStatus,omitempty"` +} + // MqttC2DMessagesNotInAllowedRange number of cloud to device messages (MQTT protocol) is not in allowed range. type MqttC2DMessagesNotInAllowedRange struct { // TimeWindowSize - The time window size in iso8601 format. @@ -12989,6 +13352,26 @@ func (mdmniar MqttD2CMessagesNotInAllowedRange) AsBasicCustomAlertRule() (BasicC return &mdmniar, true } +// NetworkInterface network interface +type NetworkInterface struct { + IPAddress *IPAddress `json:"ipAddress,omitempty"` + MacAddress *MacAddress `json:"macAddress,omitempty"` + // Vlans - READ-ONLY; List of device vlans. + Vlans *[]string `json:"vlans,omitempty"` +} + +// MarshalJSON is the custom marshaler for NetworkInterface. +func (ni NetworkInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ni.IPAddress != nil { + objectMap["ipAddress"] = ni.IPAddress + } + if ni.MacAddress != nil { + objectMap["macAddress"] = ni.MacAddress + } + return json.Marshal(objectMap) +} + // OnPremiseIotSensor on-premise IoT sensor type OnPremiseIotSensor struct { autorest.Response `json:"-"` @@ -13610,7 +13993,7 @@ type PricingList struct { // PricingProperties pricing properties for the relevant scope type PricingProperties struct { - // PricingTier - The pricing tier value. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. Possible values include: 'Free', 'Standard' + // PricingTier - The pricing tier value. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. Possible values include: 'PricingTierFree', 'PricingTierStandard' PricingTier PricingTier `json:"pricingTier,omitempty"` // FreeTrialRemainingTime - READ-ONLY; The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). FreeTrialRemainingTime *string `json:"freeTrialRemainingTime,omitempty"` @@ -13820,6 +14203,23 @@ type ProtectionMode struct { Executable Executable `json:"executable,omitempty"` } +// Protocol1 protocol data +type Protocol1 struct { + // Name - READ-ONLY; Protocol name + Name *string `json:"name,omitempty"` + // Identifiers - list of protocol identifiers. + Identifiers *string `json:"identifiers,omitempty"` +} + +// MarshalJSON is the custom marshaler for Protocol1. +func (p1 Protocol1) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p1.Identifiers != nil { + objectMap["identifiers"] = p1.Identifiers + } + return json.Marshal(objectMap) +} + // ProxyServerProperties for a non-Azure machine that is not connected directly to the internet, specify a // proxy server that the non-Azure machine can use. type ProxyServerProperties struct { diff --git a/services/preview/security/mgmt/v3.0/security/securescorecontroldefinitions.go b/services/preview/security/mgmt/v3.0/security/securescorecontroldefinitions.go index ec41c4bb8a07..dcad4fa4af0d 100644 --- a/services/preview/security/mgmt/v3.0/security/securescorecontroldefinitions.go +++ b/services/preview/security/mgmt/v3.0/security/securescorecontroldefinitions.go @@ -82,7 +82,7 @@ func (client SecureScoreControlDefinitionsClient) List(ctx context.Context) (res // ListPreparer prepares the List request. func (client SecureScoreControlDefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-01-01-preview" + const APIVersion = "2020-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -200,7 +200,7 @@ func (client SecureScoreControlDefinitionsClient) ListBySubscriptionPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01-preview" + const APIVersion = "2020-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/security/mgmt/v3.0/security/securescorecontrols.go b/services/preview/security/mgmt/v3.0/security/securescorecontrols.go index 5b1ccb5acd6e..2c3d9aa33a68 100644 --- a/services/preview/security/mgmt/v3.0/security/securescorecontrols.go +++ b/services/preview/security/mgmt/v3.0/security/securescorecontrols.go @@ -94,7 +94,7 @@ func (client SecureScoreControlsClient) ListPreparer(ctx context.Context, expand "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01-preview" + const APIVersion = "2020-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -219,7 +219,7 @@ func (client SecureScoreControlsClient) ListBySecureScorePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01-preview" + const APIVersion = "2020-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/security/mgmt/v3.0/security/securescores.go b/services/preview/security/mgmt/v3.0/security/securescores.go index 1b2511acfa6a..eb5848e0065a 100644 --- a/services/preview/security/mgmt/v3.0/security/securescores.go +++ b/services/preview/security/mgmt/v3.0/security/securescores.go @@ -92,7 +92,7 @@ func (client SecureScoresClient) GetPreparer(ctx context.Context, secureScoreNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01-preview" + const APIVersion = "2020-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,7 +172,7 @@ func (client SecureScoresClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01-preview" + const APIVersion = "2020-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go index f088bd0a321a..e528074e14c1 100644 --- a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go @@ -373,21 +373,21 @@ var _ TopologyClientAPI = (*security.TopologyClient)(nil) // AlertsClientAPI contains the set of methods on the AlertsClient type. type AlertsClientAPI interface { - GetResourceGroupLevel(ctx context.Context, alertName string, resourceGroupName string) (result security.Alert, err error) - GetSubscriptionLevel(ctx context.Context, alertName string) (result security.Alert, err error) + GetResourceGroupLevelAlerts(ctx context.Context, alertName string, resourceGroupName string) (result security.Alert, err error) + GetSubscriptionLevelAlert(ctx context.Context, alertName string) (result security.Alert, err error) List(ctx context.Context) (result security.AlertListPage, err error) ListComplete(ctx context.Context) (result security.AlertListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.AlertListPage, err error) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.AlertListIterator, err error) - ListResourceGroupLevelByRegion(ctx context.Context, resourceGroupName string) (result security.AlertListPage, err error) - ListResourceGroupLevelByRegionComplete(ctx context.Context, resourceGroupName string) (result security.AlertListIterator, err error) - ListSubscriptionLevelByRegion(ctx context.Context) (result security.AlertListPage, err error) - ListSubscriptionLevelByRegionComplete(ctx context.Context) (result security.AlertListIterator, err error) - UpdateResourceGroupLevelStateToActivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) - UpdateResourceGroupLevelStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string) (result security.AlertListPage, err error) + ListResourceGroupLevelAlertsByRegionComplete(ctx context.Context, resourceGroupName string) (result security.AlertListIterator, err error) + ListSubscriptionLevelAlertsByRegion(ctx context.Context) (result security.AlertListPage, err error) + ListSubscriptionLevelAlertsByRegionComplete(ctx context.Context) (result security.AlertListIterator, err error) + UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateResourceGroupLevelStateToResolve(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) - UpdateSubscriptionLevelStateToActivate(ctx context.Context, alertName string) (result autorest.Response, err error) - UpdateSubscriptionLevelStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) UpdateSubscriptionLevelStateToResolve(ctx context.Context, alertName string) (result autorest.Response, err error) } @@ -512,6 +512,29 @@ type IotSensorsClientAPI interface { var _ IotSensorsClientAPI = (*security.IotSensorsClient)(nil) +// DevicesForSubscriptionClientAPI contains the set of methods on the DevicesForSubscriptionClient type. +type DevicesForSubscriptionClientAPI interface { + List(ctx context.Context, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListPage, err error) + ListComplete(ctx context.Context, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListIterator, err error) +} + +var _ DevicesForSubscriptionClientAPI = (*security.DevicesForSubscriptionClient)(nil) + +// DevicesForHubClientAPI contains the set of methods on the DevicesForHubClient type. +type DevicesForHubClientAPI interface { + List(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListPage, err error) + ListComplete(ctx context.Context, resourceID string, limit *int32, skipToken string, deviceManagementType security.ManagementState) (result security.DeviceListIterator, err error) +} + +var _ DevicesForHubClientAPI = (*security.DevicesForHubClient)(nil) + +// DeviceClientAPI contains the set of methods on the DeviceClient type. +type DeviceClientAPI interface { + Get(ctx context.Context, resourceID string, deviceID string) (result security.Device, err error) +} + +var _ DeviceClientAPI = (*security.DeviceClient)(nil) + // OnPremiseIotSensorsClientAPI contains the set of methods on the OnPremiseIotSensorsClient type. type OnPremiseIotSensorsClientAPI interface { CreateOrUpdate(ctx context.Context, onPremiseIotSensorName string) (result security.OnPremiseIotSensor, err error)