diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go index 5bfa0ec85a5c..e6019f7c875c 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go @@ -119,7 +119,6 @@ func (client ActionRulesClient) CreateUpdateSender(req *http.Request) (*http.Res func (client ActionRulesClient) CreateUpdateResponder(resp *http.Response) (result ActionRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -201,7 +200,6 @@ func (client ActionRulesClient) DeleteSender(req *http.Request) (*http.Response, func (client ActionRulesClient) DeleteResponder(resp *http.Response) (result Bool, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) @@ -283,7 +281,6 @@ func (client ActionRulesClient) GetByNameSender(req *http.Request) (*http.Respon func (client ActionRulesClient) GetByNameResponder(resp *http.Response) (result ActionRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -406,7 +403,6 @@ func (client ActionRulesClient) ListByResourceGroupSender(req *http.Request) (*h func (client ActionRulesClient) ListByResourceGroupResponder(resp *http.Response) (result ActionRulesList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -563,7 +559,6 @@ func (client ActionRulesClient) ListBySubscriptionSender(req *http.Request) (*ht func (client ActionRulesClient) ListBySubscriptionResponder(resp *http.Response) (result ActionRulesList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -685,7 +680,6 @@ func (client ActionRulesClient) UpdateSender(req *http.Request) (*http.Response, func (client ActionRulesClient) UpdateResponder(resp *http.Response) (result ActionRule, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go index 7e07bb0d037a..725d2ee58a59 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go @@ -116,7 +116,6 @@ func (client AlertsClient) ChangeStateSender(req *http.Request) (*http.Response, func (client AlertsClient) ChangeStateResponder(resp *http.Response) (result Alert, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -273,7 +272,6 @@ func (client AlertsClient) GetAllSender(req *http.Request) (*http.Response, erro func (client AlertsClient) GetAllResponder(resp *http.Response) (result AlertsList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -390,7 +388,6 @@ func (client AlertsClient) GetByIDSender(req *http.Request) (*http.Response, err func (client AlertsClient) GetByIDResponder(resp *http.Response) (result Alert, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -471,7 +468,6 @@ func (client AlertsClient) GetHistorySender(req *http.Request) (*http.Response, func (client AlertsClient) GetHistoryResponder(resp *http.Response) (result AlertModification, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -600,7 +596,6 @@ func (client AlertsClient) GetSummarySender(req *http.Request) (*http.Response, func (client AlertsClient) GetSummaryResponder(resp *http.Response) (result AlertsSummary, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -668,7 +663,6 @@ func (client AlertsClient) MetaDataSender(req *http.Request) (*http.Response, er func (client AlertsClient) MetaDataResponder(resp *http.Response) (result AlertsMetaData, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/models.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/models.go index cb42cbdb47fa..735b904268b8 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/models.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/models.go @@ -49,17 +49,29 @@ func PossibleActionRuleStatusValues() []ActionRuleStatus { type AlertModificationEvent string const ( + // ActionRuleSuppressed ... + ActionRuleSuppressed AlertModificationEvent = "ActionRuleSuppressed" + // ActionRuleTriggered ... + ActionRuleTriggered AlertModificationEvent = "ActionRuleTriggered" + // ActionsFailed ... + ActionsFailed AlertModificationEvent = "ActionsFailed" + // ActionsSuppressed ... + ActionsSuppressed AlertModificationEvent = "ActionsSuppressed" + // ActionsTriggered ... + ActionsTriggered AlertModificationEvent = "ActionsTriggered" // AlertCreated ... AlertCreated AlertModificationEvent = "AlertCreated" // MonitorConditionChange ... MonitorConditionChange AlertModificationEvent = "MonitorConditionChange" + // SeverityChange ... + SeverityChange AlertModificationEvent = "SeverityChange" // StateChange ... StateChange AlertModificationEvent = "StateChange" ) // PossibleAlertModificationEventValues returns an array of possible values for the AlertModificationEvent const type. func PossibleAlertModificationEventValues() []AlertModificationEvent { - return []AlertModificationEvent{AlertCreated, MonitorConditionChange, StateChange} + return []AlertModificationEvent{ActionRuleSuppressed, ActionRuleTriggered, ActionsFailed, ActionsSuppressed, ActionsTriggered, AlertCreated, MonitorConditionChange, SeverityChange, StateChange} } // AlertsSortByFields enumerates the values for alerts sort by fields. @@ -229,11 +241,13 @@ const ( ScopeTypeResource ScopeType = "Resource" // ScopeTypeResourceGroup ... ScopeTypeResourceGroup ScopeType = "ResourceGroup" + // ScopeTypeSubscription ... + ScopeTypeSubscription ScopeType = "Subscription" ) // PossibleScopeTypeValues returns an array of possible values for the ScopeType const type. func PossibleScopeTypeValues() []ScopeType { - return []ScopeType{ScopeTypeResource, ScopeTypeResourceGroup} + return []ScopeType{ScopeTypeResource, ScopeTypeResourceGroup, ScopeTypeSubscription} } // Severity enumerates the values for severity. @@ -856,7 +870,7 @@ type AlertModification struct { // AlertModificationItem alert modification item. type AlertModificationItem struct { - // ModificationEvent - Reason for the modification. Possible values include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + // ModificationEvent - Reason for the modification. Possible values include: 'AlertCreated', 'StateChange', 'MonitorConditionChange', 'SeverityChange', 'ActionRuleTriggered', 'ActionRuleSuppressed', 'ActionsTriggered', 'ActionsSuppressed', 'ActionsFailed' ModificationEvent AlertModificationEvent `json:"modificationEvent,omitempty"` // OldValue - Old value OldValue *string `json:"oldValue,omitempty"` @@ -1637,7 +1651,7 @@ type Resource struct { // Scope target scope for a given action rule. By default scope will be the subscription. User can also // provide list of resource groups or list of resources from the scope subscription as well. type Scope struct { - // ScopeType - type of target scope. Possible values include: 'ScopeTypeResourceGroup', 'ScopeTypeResource' + // ScopeType - type of target scope. Possible values include: 'ScopeTypeResourceGroup', 'ScopeTypeResource', 'ScopeTypeSubscription' ScopeType ScopeType `json:"scopeType,omitempty"` // Values - list of ARM IDs of the given scope type which will be the target of the given action rule. Values *[]string `json:"values,omitempty"` diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go index 269a0ff01d10..6ef86bbbf66a 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go @@ -101,7 +101,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go index 3a21830eddb5..7c6b9d8fdc31 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go @@ -116,7 +116,6 @@ func (client SmartGroupsClient) ChangeStateSender(req *http.Request) (*http.Resp func (client SmartGroupsClient) ChangeStateResponder(resp *http.Response) (result SmartGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -242,7 +241,6 @@ func (client SmartGroupsClient) GetAllSender(req *http.Request) (*http.Response, func (client SmartGroupsClient) GetAllResponder(resp *http.Response) (result SmartGroupsList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -359,7 +357,6 @@ func (client SmartGroupsClient) GetByIDSender(req *http.Request) (*http.Response func (client SmartGroupsClient) GetByIDResponder(resp *http.Response) (result SmartGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -439,7 +436,6 @@ func (client SmartGroupsClient) GetHistorySender(req *http.Request) (*http.Respo func (client SmartGroupsClient) GetHistoryResponder(resp *http.Response) (result SmartGroupModification, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/version.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/version.go index da1395c08da1..b5cf618b1527 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/version.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " alertsmanagement/2019-05-05-preview" + return "Azure-SDK-For-Go/" + Version() + " alertsmanagement/2019-05-05-preview" } // Version returns the semantic version (see http://semver.org) of the client.