diff --git a/services/preview/security/mgmt/v2.0/security/connectors.go b/services/preview/security/mgmt/v2.0/security/connectors.go
index 283167416f16..f49e28025643 100644
--- a/services/preview/security/mgmt/v2.0/security/connectors.go
+++ b/services/preview/security/mgmt/v2.0/security/connectors.go
@@ -42,8 +42,8 @@ func NewConnectorsClientWithBaseURI(baseURI string, subscriptionID string, ascLo
return ConnectorsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)}
}
-// CreateOrUpdate create a cloud account connector or update an existing one. Connect to your AWS cloud account using
-// either account credentials or role-based authentication.
+// CreateOrUpdate create a cloud account connector or update an existing one. Connect to your cloud account. For AWS,
+// use either account credentials or role-based authentication. For GCP, use account organization credentials.
// Parameters:
// connectorName - name of the cloud account connector
// connectorSetting - settings for the cloud account connector
diff --git a/services/preview/security/mgmt/v2.0/security/enums.go b/services/preview/security/mgmt/v2.0/security/enums.go
index 5ef39d03351b..6db10276c7d1 100644
--- a/services/preview/security/mgmt/v2.0/security/enums.go
+++ b/services/preview/security/mgmt/v2.0/security/enums.go
@@ -123,7 +123,7 @@ func PossibleAssessedResourceTypeValues() []AssessedResourceType {
type AuthenticationProvisioningState string
const (
- // Expired the connection is expired
+ // Expired the connection has expired
Expired AuthenticationProvisioningState = "Expired"
// IncorrectPolicy Incorrect policy of the connector
IncorrectPolicy AuthenticationProvisioningState = "IncorrectPolicy"
@@ -161,9 +161,9 @@ func PossibleAuthenticationTypeValues() []AuthenticationType {
type AutoProvision string
const (
- // AutoProvisionOff Do not install Azure Arc agent on the VMs automatically
+ // AutoProvisionOff Do not install Azure Arc agent on the machines automatically
AutoProvisionOff AutoProvision = "Off"
- // AutoProvisionOn Install missing Azure Arc agent on VMs automatically
+ // AutoProvisionOn Install missing Azure Arc agents on machines automatically
AutoProvisionOn AutoProvision = "On"
)
@@ -819,6 +819,27 @@ func PossibleReportedSeverityValues() []ReportedSeverity {
return []ReportedSeverity{High, Informational, Low, Medium}
}
+// RuleSeverity enumerates the values for rule severity.
+type RuleSeverity string
+
+const (
+ // RuleSeverityHigh High
+ RuleSeverityHigh RuleSeverity = "High"
+ // RuleSeverityInformational Informational
+ RuleSeverityInformational RuleSeverity = "Informational"
+ // RuleSeverityLow Low
+ RuleSeverityLow RuleSeverity = "Low"
+ // RuleSeverityMedium Medium
+ RuleSeverityMedium RuleSeverity = "Medium"
+ // RuleSeverityObsolete Obsolete
+ RuleSeverityObsolete RuleSeverity = "Obsolete"
+)
+
+// PossibleRuleSeverityValues returns an array of possible values for the RuleSeverity const type.
+func PossibleRuleSeverityValues() []RuleSeverity {
+ return []RuleSeverity{RuleSeverityHigh, RuleSeverityInformational, RuleSeverityLow, RuleSeverityMedium, RuleSeverityObsolete}
+}
+
// RuleState enumerates the values for rule state.
type RuleState string
@@ -836,65 +857,135 @@ func PossibleRuleStateValues() []RuleState {
return []RuleState{RuleStateDisabled, RuleStateEnabled, RuleStateExpired}
}
+// RuleStatus enumerates the values for rule status.
+type RuleStatus string
+
+const (
+ // Finding Finding
+ Finding RuleStatus = "Finding"
+ // InternalError InternalError
+ InternalError RuleStatus = "InternalError"
+ // NonFinding NonFinding
+ NonFinding RuleStatus = "NonFinding"
+)
+
+// PossibleRuleStatusValues returns an array of possible values for the RuleStatus const type.
+func PossibleRuleStatusValues() []RuleStatus {
+ return []RuleStatus{Finding, InternalError, NonFinding}
+}
+
// RuleType enumerates the values for rule type.
type RuleType string
+const (
+ // BaselineExpected BaselineExpected
+ BaselineExpected RuleType = "BaselineExpected"
+ // Binary Binary
+ Binary RuleType = "Binary"
+ // NegativeList NegativeList
+ NegativeList RuleType = "NegativeList"
+ // PositiveList PositiveList
+ PositiveList RuleType = "PositiveList"
+)
+
+// PossibleRuleTypeValues returns an array of possible values for the RuleType const type.
+func PossibleRuleTypeValues() []RuleType {
+ return []RuleType{BaselineExpected, Binary, NegativeList, PositiveList}
+}
+
+// RuleTypeBasicCustomAlertRule enumerates the values for rule type basic custom alert rule.
+type RuleTypeBasicCustomAlertRule string
+
const (
// RuleTypeActiveConnectionsNotInAllowedRange ...
- RuleTypeActiveConnectionsNotInAllowedRange RuleType = "ActiveConnectionsNotInAllowedRange"
+ RuleTypeActiveConnectionsNotInAllowedRange RuleTypeBasicCustomAlertRule = "ActiveConnectionsNotInAllowedRange"
// RuleTypeAllowlistCustomAlertRule ...
- RuleTypeAllowlistCustomAlertRule RuleType = "AllowlistCustomAlertRule"
+ RuleTypeAllowlistCustomAlertRule RuleTypeBasicCustomAlertRule = "AllowlistCustomAlertRule"
// RuleTypeAmqpC2DMessagesNotInAllowedRange ...
- RuleTypeAmqpC2DMessagesNotInAllowedRange RuleType = "AmqpC2DMessagesNotInAllowedRange"
+ RuleTypeAmqpC2DMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "AmqpC2DMessagesNotInAllowedRange"
// RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange ...
- RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange RuleType = "AmqpC2DRejectedMessagesNotInAllowedRange"
+ RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "AmqpC2DRejectedMessagesNotInAllowedRange"
// RuleTypeAmqpD2CMessagesNotInAllowedRange ...
- RuleTypeAmqpD2CMessagesNotInAllowedRange RuleType = "AmqpD2CMessagesNotInAllowedRange"
+ RuleTypeAmqpD2CMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "AmqpD2CMessagesNotInAllowedRange"
// RuleTypeConnectionToIPNotAllowed ...
- RuleTypeConnectionToIPNotAllowed RuleType = "ConnectionToIpNotAllowed"
+ RuleTypeConnectionToIPNotAllowed RuleTypeBasicCustomAlertRule = "ConnectionToIpNotAllowed"
// RuleTypeCustomAlertRule ...
- RuleTypeCustomAlertRule RuleType = "CustomAlertRule"
+ RuleTypeCustomAlertRule RuleTypeBasicCustomAlertRule = "CustomAlertRule"
// RuleTypeDenylistCustomAlertRule ...
- RuleTypeDenylistCustomAlertRule RuleType = "DenylistCustomAlertRule"
+ RuleTypeDenylistCustomAlertRule RuleTypeBasicCustomAlertRule = "DenylistCustomAlertRule"
// RuleTypeDirectMethodInvokesNotInAllowedRange ...
- RuleTypeDirectMethodInvokesNotInAllowedRange RuleType = "DirectMethodInvokesNotInAllowedRange"
+ RuleTypeDirectMethodInvokesNotInAllowedRange RuleTypeBasicCustomAlertRule = "DirectMethodInvokesNotInAllowedRange"
// RuleTypeFailedLocalLoginsNotInAllowedRange ...
- RuleTypeFailedLocalLoginsNotInAllowedRange RuleType = "FailedLocalLoginsNotInAllowedRange"
+ RuleTypeFailedLocalLoginsNotInAllowedRange RuleTypeBasicCustomAlertRule = "FailedLocalLoginsNotInAllowedRange"
// RuleTypeFileUploadsNotInAllowedRange ...
- RuleTypeFileUploadsNotInAllowedRange RuleType = "FileUploadsNotInAllowedRange"
+ RuleTypeFileUploadsNotInAllowedRange RuleTypeBasicCustomAlertRule = "FileUploadsNotInAllowedRange"
// RuleTypeHTTPC2DMessagesNotInAllowedRange ...
- RuleTypeHTTPC2DMessagesNotInAllowedRange RuleType = "HttpC2DMessagesNotInAllowedRange"
+ RuleTypeHTTPC2DMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "HttpC2DMessagesNotInAllowedRange"
// RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange ...
- RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange RuleType = "HttpC2DRejectedMessagesNotInAllowedRange"
+ RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "HttpC2DRejectedMessagesNotInAllowedRange"
// RuleTypeHTTPD2CMessagesNotInAllowedRange ...
- RuleTypeHTTPD2CMessagesNotInAllowedRange RuleType = "HttpD2CMessagesNotInAllowedRange"
+ RuleTypeHTTPD2CMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "HttpD2CMessagesNotInAllowedRange"
// RuleTypeListCustomAlertRule ...
- RuleTypeListCustomAlertRule RuleType = "ListCustomAlertRule"
+ RuleTypeListCustomAlertRule RuleTypeBasicCustomAlertRule = "ListCustomAlertRule"
// RuleTypeLocalUserNotAllowed ...
- RuleTypeLocalUserNotAllowed RuleType = "LocalUserNotAllowed"
+ RuleTypeLocalUserNotAllowed RuleTypeBasicCustomAlertRule = "LocalUserNotAllowed"
// RuleTypeMqttC2DMessagesNotInAllowedRange ...
- RuleTypeMqttC2DMessagesNotInAllowedRange RuleType = "MqttC2DMessagesNotInAllowedRange"
+ RuleTypeMqttC2DMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "MqttC2DMessagesNotInAllowedRange"
// RuleTypeMqttC2DRejectedMessagesNotInAllowedRange ...
- RuleTypeMqttC2DRejectedMessagesNotInAllowedRange RuleType = "MqttC2DRejectedMessagesNotInAllowedRange"
+ RuleTypeMqttC2DRejectedMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "MqttC2DRejectedMessagesNotInAllowedRange"
// RuleTypeMqttD2CMessagesNotInAllowedRange ...
- RuleTypeMqttD2CMessagesNotInAllowedRange RuleType = "MqttD2CMessagesNotInAllowedRange"
+ RuleTypeMqttD2CMessagesNotInAllowedRange RuleTypeBasicCustomAlertRule = "MqttD2CMessagesNotInAllowedRange"
// RuleTypeProcessNotAllowed ...
- RuleTypeProcessNotAllowed RuleType = "ProcessNotAllowed"
+ RuleTypeProcessNotAllowed RuleTypeBasicCustomAlertRule = "ProcessNotAllowed"
// RuleTypeQueuePurgesNotInAllowedRange ...
- RuleTypeQueuePurgesNotInAllowedRange RuleType = "QueuePurgesNotInAllowedRange"
+ RuleTypeQueuePurgesNotInAllowedRange RuleTypeBasicCustomAlertRule = "QueuePurgesNotInAllowedRange"
// RuleTypeThresholdCustomAlertRule ...
- RuleTypeThresholdCustomAlertRule RuleType = "ThresholdCustomAlertRule"
+ RuleTypeThresholdCustomAlertRule RuleTypeBasicCustomAlertRule = "ThresholdCustomAlertRule"
// RuleTypeTimeWindowCustomAlertRule ...
- RuleTypeTimeWindowCustomAlertRule RuleType = "TimeWindowCustomAlertRule"
+ RuleTypeTimeWindowCustomAlertRule RuleTypeBasicCustomAlertRule = "TimeWindowCustomAlertRule"
// RuleTypeTwinUpdatesNotInAllowedRange ...
- RuleTypeTwinUpdatesNotInAllowedRange RuleType = "TwinUpdatesNotInAllowedRange"
+ RuleTypeTwinUpdatesNotInAllowedRange RuleTypeBasicCustomAlertRule = "TwinUpdatesNotInAllowedRange"
// RuleTypeUnauthorizedOperationsNotInAllowedRange ...
- RuleTypeUnauthorizedOperationsNotInAllowedRange RuleType = "UnauthorizedOperationsNotInAllowedRange"
+ RuleTypeUnauthorizedOperationsNotInAllowedRange RuleTypeBasicCustomAlertRule = "UnauthorizedOperationsNotInAllowedRange"
)
-// PossibleRuleTypeValues returns an array of possible values for the RuleType const type.
-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}
+// PossibleRuleTypeBasicCustomAlertRuleValues returns an array of possible values for the RuleTypeBasicCustomAlertRule const type.
+func PossibleRuleTypeBasicCustomAlertRuleValues() []RuleTypeBasicCustomAlertRule {
+ return []RuleTypeBasicCustomAlertRule{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}
+}
+
+// ScanState enumerates the values for scan state.
+type ScanState string
+
+const (
+ // ScanStateFailed Failed
+ ScanStateFailed ScanState = "Failed"
+ // ScanStateFailedToRun FailedToRun
+ ScanStateFailedToRun ScanState = "FailedToRun"
+ // ScanStateInProgress InProgress
+ ScanStateInProgress ScanState = "InProgress"
+ // ScanStatePassed Passed
+ ScanStatePassed ScanState = "Passed"
+)
+
+// PossibleScanStateValues returns an array of possible values for the ScanState const type.
+func PossibleScanStateValues() []ScanState {
+ return []ScanState{ScanStateFailed, ScanStateFailedToRun, ScanStateInProgress, ScanStatePassed}
+}
+
+// ScanTriggerType enumerates the values for scan trigger type.
+type ScanTriggerType string
+
+const (
+ // OnDemand OnDemand
+ OnDemand ScanTriggerType = "OnDemand"
+ // Recurring Recurring
+ Recurring ScanTriggerType = "Recurring"
+)
+
+// PossibleScanTriggerTypeValues returns an array of possible values for the ScanTriggerType const type.
+func PossibleScanTriggerTypeValues() []ScanTriggerType {
+ return []ScanTriggerType{OnDemand, Recurring}
}
// Script enumerates the values for script.
diff --git a/services/preview/security/mgmt/v2.0/security/models.go b/services/preview/security/mgmt/v2.0/security/models.go
index 2fc8dba58ce9..c7a51a331af9 100644
--- a/services/preview/security/mgmt/v2.0/security/models.go
+++ b/services/preview/security/mgmt/v2.0/security/models.go
@@ -116,7 +116,7 @@ type ActiveConnectionsNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for ActiveConnectionsNotInAllowedRange.
@@ -1643,7 +1643,7 @@ type AllowlistCustomAlertRule struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
func unmarshalBasicAllowlistCustomAlertRule(body []byte) (BasicAllowlistCustomAlertRule, error) {
@@ -1872,7 +1872,7 @@ type AmqpC2DMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for AmqpC2DMessagesNotInAllowedRange.
@@ -2063,7 +2063,7 @@ type AmqpC2DRejectedMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for AmqpC2DRejectedMessagesNotInAllowedRange.
@@ -2253,7 +2253,7 @@ type AmqpD2CMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for AmqpD2CMessagesNotInAllowedRange.
@@ -3887,9 +3887,10 @@ type AutoProvisioningSettingProperties struct {
}
// AwAssumeRoleAuthenticationDetailsProperties AWS cloud account connector based assume role, the role enables
-// delegating access to your AWS resources. The role is composed of role arn and external id, for more details,
-// refer to Creating a
-// Role to Delegate Permissions to an IAM User (write only)
+// delegating access to your AWS resources. The role is composed of role Amazon Resource Name (ARN) and
+// external ID. For more details, refer to Creating a Role to
+// Delegate Permissions to an IAM User (write only)
type AwAssumeRoleAuthenticationDetailsProperties struct {
// AccountID - READ-ONLY; The ID of the cloud account
AccountID *string `json:"accountId,omitempty"`
@@ -3947,7 +3948,7 @@ func (aaradp AwAssumeRoleAuthenticationDetailsProperties) AsBasicAuthenticationD
}
// AwsCredsAuthenticationDetailsProperties AWS cloud account connector based credentials, the credentials is
-// composed of access key id and secret key, for more details, refer to Creating an IAM User in Your
// AWS Account (write only)
type AwsCredsAuthenticationDetailsProperties struct {
@@ -4066,6 +4067,33 @@ type AzureTrackedResourceLocation struct {
Location *string `json:"location,omitempty"`
}
+// Baseline baseline details.
+type Baseline struct {
+ // ExpectedResults - Expected results.
+ ExpectedResults *[][]string `json:"expectedResults,omitempty"`
+ // UpdatedTime - Baseline update time (UTC).
+ UpdatedTime *date.Time `json:"updatedTime,omitempty"`
+}
+
+// BaselineAdjustedResult the rule result adjusted with baseline.
+type BaselineAdjustedResult struct {
+ Baseline *Baseline `json:"baseline,omitempty"`
+ // Status - Possible values include: 'NonFinding', 'Finding', 'InternalError'
+ Status RuleStatus `json:"status,omitempty"`
+ // ResultsNotInBaseline - Results the are not in baseline.
+ ResultsNotInBaseline *[][]string `json:"resultsNotInBaseline,omitempty"`
+ // ResultsOnlyInBaseline - Results the are in baseline.
+ ResultsOnlyInBaseline *[][]string `json:"resultsOnlyInBaseline,omitempty"`
+}
+
+// BenchmarkReference the benchmark references.
+type BenchmarkReference struct {
+ // Benchmark - The benchmark name.
+ Benchmark *string `json:"benchmark,omitempty"`
+ // Reference - The benchmark reference.
+ Reference *string `json:"reference,omitempty"`
+}
+
// CefExternalSecuritySolution represents a security solution which sends CEF logs to an OMS workspace
type CefExternalSecuritySolution struct {
Properties *CefSolutionProperties `json:"properties,omitempty"`
@@ -4584,7 +4612,7 @@ type ConnectionToIPNotAllowed struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for ConnectionToIPNotAllowed.
@@ -4991,9 +5019,9 @@ func NewConnectorSettingListPage(getNextPage func(context.Context, ConnectorSett
return ConnectorSettingListPage{fn: getNextPage}
}
-// ConnectorSettingProperties describes properties of an connector setting
+// ConnectorSettingProperties describes properties of a connector setting
type ConnectorSettingProperties struct {
- // HybridComputeSettings - Settings for hybrid compute management, these settings are relevant only Arc autoProvision (Hybrid Compute).
+ // HybridComputeSettings - Settings for hybrid compute management. These settings are relevant only for Arc autoProvision (Hybrid Compute).
HybridComputeSettings *HybridComputeSettingsProperties `json:"hybridComputeSettings,omitempty"`
// AuthenticationDetails - Settings for authentication management, these settings are relevant only for the cloud connector.
AuthenticationDetails BasicAuthenticationDetailsProperties `json:"authenticationDetails,omitempty"`
@@ -5372,7 +5400,7 @@ type CustomAlertRule struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
func unmarshalBasicCustomAlertRule(body []byte) (BasicCustomAlertRule, error) {
@@ -5787,7 +5815,7 @@ type DenylistCustomAlertRule struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for DenylistCustomAlertRule.
@@ -6269,7 +6297,7 @@ type DirectMethodInvokesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for DirectMethodInvokesNotInAllowedRange.
@@ -7139,7 +7167,7 @@ type FailedLocalLoginsNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for FailedLocalLoginsNotInAllowedRange.
@@ -7329,7 +7357,7 @@ type FileUploadsNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for FileUploadsNotInAllowedRange.
@@ -7505,29 +7533,29 @@ func (funiar FileUploadsNotInAllowedRange) AsBasicCustomAlertRule() (BasicCustom
}
// GcpCredentialsDetailsProperties GCP cloud account connector based service to service credentials, the
-// credentials is composed of organization id and json api key (write only)
+// credentials are composed of the organization ID and a JSON API key (write only)
type GcpCredentialsDetailsProperties struct {
- // OrganizationID - The Organization ID of the GCP cloud account
+ // OrganizationID - The organization ID of the GCP cloud account
OrganizationID *string `json:"organizationId,omitempty"`
// Type - Type field of the API key (write only)
Type *string `json:"type,omitempty"`
- // ProjectID - Project Id field of the API key (write only)
+ // ProjectID - Project ID field of the API key (write only)
ProjectID *string `json:"projectId,omitempty"`
- // PrivateKeyID - Private key Id field of the API key (write only)
+ // PrivateKeyID - Private key ID field of the API key (write only)
PrivateKeyID *string `json:"privateKeyId,omitempty"`
// PrivateKey - Private key field of the API key (write only)
PrivateKey *string `json:"privateKey,omitempty"`
// ClientEmail - Client email field of the API key (write only)
ClientEmail *string `json:"clientEmail,omitempty"`
- // ClientID - Client Id field of the API key (write only)
+ // ClientID - Client ID field of the API key (write only)
ClientID *string `json:"clientId,omitempty"`
- // AuthURI - Auth Uri field of the API key (write only)
+ // AuthURI - Auth URI field of the API key (write only)
AuthURI *string `json:"authUri,omitempty"`
- // TokenURI - Token Uri field of the API key (write only)
+ // TokenURI - Token URI field of the API key (write only)
TokenURI *string `json:"tokenUri,omitempty"`
- // AuthProviderX509CertURL - Auth provider x509 certificate url field of the API key (write only)
+ // AuthProviderX509CertURL - Auth provider x509 certificate URL field of the API key (write only)
AuthProviderX509CertURL *string `json:"authProviderX509CertUrl,omitempty"`
- // ClientX509CertURL - Client x509 certificate url field of the API key (write only)
+ // ClientX509CertURL - Client x509 certificate URL field of the API key (write only)
ClientX509CertURL *string `json:"clientX509CertUrl,omitempty"`
// AuthenticationProvisioningState - READ-ONLY; State of the multi-cloud connector. Possible values include: 'Valid', 'Invalid', 'Expired', 'IncorrectPolicy'
AuthenticationProvisioningState AuthenticationProvisioningState `json:"authenticationProvisioningState,omitempty"`
@@ -7620,7 +7648,7 @@ type HTTPC2DMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for HTTPC2DMessagesNotInAllowedRange.
@@ -7811,7 +7839,7 @@ type HTTPC2DRejectedMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for HTTPC2DRejectedMessagesNotInAllowedRange.
@@ -8001,7 +8029,7 @@ type HTTPD2CMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for HTTPD2CMessagesNotInAllowedRange.
@@ -8184,7 +8212,7 @@ type HybridComputeSettingsProperties struct {
AutoProvision AutoProvision `json:"autoProvision,omitempty"`
// ResourceGroupName - The name of the resource group where Arc (Hybrid Compute) connectors are connected.
ResourceGroupName *string `json:"resourceGroupName,omitempty"`
- // Region - The location where the meta data of machines will be stored
+ // Region - The location where the metadata of machines will be stored
Region *string `json:"region,omitempty"`
// ProxyServer - For a non-Azure machine that is not connected directly to the internet, specify a proxy server that the non-Azure machine can use.
ProxyServer *ProxyServerProperties `json:"proxyServer,omitempty"`
@@ -10005,7 +10033,7 @@ type ListCustomAlertRule struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
func unmarshalBasicListCustomAlertRule(body []byte) (BasicListCustomAlertRule, error) {
@@ -10237,7 +10265,7 @@ type LocalUserNotAllowed struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for LocalUserNotAllowed.
@@ -10427,7 +10455,7 @@ type MqttC2DMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for MqttC2DMessagesNotInAllowedRange.
@@ -10618,7 +10646,7 @@ type MqttC2DRejectedMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for MqttC2DRejectedMessagesNotInAllowedRange.
@@ -10808,7 +10836,7 @@ type MqttD2CMessagesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for MqttD2CMessagesNotInAllowedRange.
@@ -11494,7 +11522,7 @@ type ProcessNotAllowed struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for ProcessNotAllowed.
@@ -11697,6 +11725,16 @@ type PublisherInfo struct {
Version *string `json:"version,omitempty"`
}
+// QueryCheck the rule query details.
+type QueryCheck struct {
+ // Query - The rule query.
+ Query *string `json:"query,omitempty"`
+ // ExpectedResult - Expected result.
+ ExpectedResult *[][]string `json:"expectedResult,omitempty"`
+ // ColumnNames - Column names of expected result.
+ ColumnNames *[]string `json:"columnNames,omitempty"`
+}
+
// QueuePurgesNotInAllowedRange number of device queue purges is not in allowed range.
type QueuePurgesNotInAllowedRange struct {
// TimeWindowSize - The time window size in iso8601 format.
@@ -11712,7 +11750,7 @@ type QueuePurgesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for QueuePurgesNotInAllowedRange.
@@ -12699,6 +12737,18 @@ func (rcsp RegulatoryComplianceStandardProperties) MarshalJSON() ([]byte, error)
return json.Marshal(objectMap)
}
+// Remediation remediation details.
+type Remediation struct {
+ // Description - Remediation description.
+ Description *string `json:"description,omitempty"`
+ // Scripts - Remediation script.
+ Scripts *[]string `json:"scripts,omitempty"`
+ // Automated - Is remediation automated.
+ Automated *bool `json:"automated,omitempty"`
+ // PortalLink - Optional link to remediate in Azure Portal.
+ PortalLink *string `json:"portalLink,omitempty"`
+}
+
// Resource describes an Azure resource.
type Resource struct {
// ID - READ-ONLY; Resource Id
@@ -12824,6 +12874,173 @@ type Rule struct {
IPAddresses *[]string `json:"ipAddresses,omitempty"`
}
+// RuleResults rule results.
+type RuleResults struct {
+ autorest.Response `json:"-"`
+ Properties *RuleResultsProperties `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 RuleResults.
+func (rr RuleResults) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rr.Properties != nil {
+ objectMap["properties"] = rr.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// RuleResultsInput rule results input.
+type RuleResultsInput struct {
+ // LatestScan - Take results from latest scan.
+ LatestScan *bool `json:"latestScan,omitempty"`
+ // Results - Expected results to be inserted into the baseline.
+ // Leave this field empty it LatestScan == true.
+ Results *[][]string `json:"results,omitempty"`
+}
+
+// RuleResultsProperties rule results properties.
+type RuleResultsProperties struct {
+ // Results - Expected results in the baseline.
+ Results *[][]string `json:"results,omitempty"`
+}
+
+// RulesResults a list of rules results.
+type RulesResults struct {
+ autorest.Response `json:"-"`
+ // Value - List of rule results.
+ Value *[]RuleResults `json:"value,omitempty"`
+}
+
+// RulesResultsInput rules results input.
+type RulesResultsInput struct {
+ // LatestScan - Take results from latest scan.
+ LatestScan *bool `json:"latestScan,omitempty"`
+ // Results - Expected results to be inserted into the baseline.
+ // Leave this field empty it LatestScan == true.
+ Results map[string][][]string `json:"results"`
+}
+
+// MarshalJSON is the custom marshaler for RulesResultsInput.
+func (rri RulesResultsInput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rri.LatestScan != nil {
+ objectMap["latestScan"] = rri.LatestScan
+ }
+ if rri.Results != nil {
+ objectMap["results"] = rri.Results
+ }
+ return json.Marshal(objectMap)
+}
+
+// Scan a vulnerability assessment scan record.
+type Scan struct {
+ autorest.Response `json:"-"`
+ Properties *ScanProperties `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 Scan.
+func (s Scan) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.Properties != nil {
+ objectMap["properties"] = s.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// ScanProperties a vulnerability assessment scan record properties.
+type ScanProperties struct {
+ // TriggerType - Possible values include: 'OnDemand', 'Recurring'
+ TriggerType ScanTriggerType `json:"triggerType,omitempty"`
+ // State - Possible values include: 'ScanStateFailed', 'ScanStateFailedToRun', 'ScanStateInProgress', 'ScanStatePassed'
+ State ScanState `json:"state,omitempty"`
+ // Server - The server name.
+ Server *string `json:"server,omitempty"`
+ // Database - The database name.
+ Database *string `json:"database,omitempty"`
+ // SQLVersion - The SQL version.
+ SQLVersion *string `json:"sqlVersion,omitempty"`
+ // StartTime - The scan start time (UTC).
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - Scan results are valid until end time (UTC).
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // HighSeverityFailedRulesCount - The number of failed rules with high severity.
+ HighSeverityFailedRulesCount *int32 `json:"highSeverityFailedRulesCount,omitempty"`
+ // MediumSeverityFailedRulesCount - The number of failed rules with medium severity.
+ MediumSeverityFailedRulesCount *int32 `json:"mediumSeverityFailedRulesCount,omitempty"`
+ // LowSeverityFailedRulesCount - The number of failed rules with low severity.
+ LowSeverityFailedRulesCount *int32 `json:"lowSeverityFailedRulesCount,omitempty"`
+ // TotalPassedRulesCount - The number of total passed rules.
+ TotalPassedRulesCount *int32 `json:"totalPassedRulesCount,omitempty"`
+ // TotalFailedRulesCount - The number of total failed rules.
+ TotalFailedRulesCount *int32 `json:"totalFailedRulesCount,omitempty"`
+ // TotalRulesCount - The number of total rules assessed.
+ TotalRulesCount *int32 `json:"totalRulesCount,omitempty"`
+ // IsBaselineApplied - Baseline created for this database, and has one or more rules.
+ IsBaselineApplied *bool `json:"isBaselineApplied,omitempty"`
+}
+
+// ScanResult a vulnerability assessment scan result for a single rule.
+type ScanResult struct {
+ autorest.Response `json:"-"`
+ Properties *ScanResultProperties `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 ScanResult.
+func (sr ScanResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sr.Properties != nil {
+ objectMap["properties"] = sr.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// ScanResultProperties a vulnerability assessment scan result properties for a single rule.
+type ScanResultProperties struct {
+ // RuleID - The rule Id.
+ RuleID *string `json:"ruleId,omitempty"`
+ // Status - Possible values include: 'NonFinding', 'Finding', 'InternalError'
+ Status RuleStatus `json:"status,omitempty"`
+ // IsTrimmed - Indicated whether the results specified here are trimmed.
+ IsTrimmed *bool `json:"isTrimmed,omitempty"`
+ // QueryResults - The results of the query that was run.
+ QueryResults *[][]string `json:"queryResults,omitempty"`
+ Remediation *Remediation `json:"remediation,omitempty"`
+ BaselineAdjustedResult *BaselineAdjustedResult `json:"baselineAdjustedResult,omitempty"`
+ RuleMetadata *VaRule `json:"ruleMetadata,omitempty"`
+}
+
+// ScanResults a list of vulnerability assessment scan results.
+type ScanResults struct {
+ autorest.Response `json:"-"`
+ // Value - List of vulnerability assessment scan results.
+ Value *[]ScanResult `json:"value,omitempty"`
+}
+
+// Scans a list of vulnerability assessment scan records.
+type Scans struct {
+ autorest.Response `json:"-"`
+ // Value - List of vulnerability assessment scan records.
+ Value *[]Scan `json:"value,omitempty"`
+}
+
// ScopeElement a more specific scope used to identify the alerts to suppress.
type ScopeElement struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -13838,7 +14055,7 @@ func (svp ServerVulnerabilityProperties) AsBasicAdditionalData() (BasicAdditiona
// ServicePrincipalProperties details of the service principal.
type ServicePrincipalProperties struct {
- // ApplicationID - Application id of service principal.
+ // ApplicationID - Application ID of service principal.
ApplicationID *string `json:"applicationId,omitempty"`
// Secret - A secret string that the application uses to prove its identity, also can be referred to as application password (write only).
Secret *string `json:"secret,omitempty"`
@@ -14849,7 +15066,7 @@ type ThresholdCustomAlertRule struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
func unmarshalBasicThresholdCustomAlertRule(body []byte) (BasicThresholdCustomAlertRule, error) {
@@ -15160,7 +15377,7 @@ type TimeWindowCustomAlertRule struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
func unmarshalBasicTimeWindowCustomAlertRule(body []byte) (BasicTimeWindowCustomAlertRule, error) {
@@ -15760,7 +15977,7 @@ type TwinUpdatesNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for TwinUpdatesNotInAllowedRange.
@@ -15950,7 +16167,7 @@ type UnauthorizedOperationsNotInAllowedRange struct {
// IsEnabled - Status of the custom alert.
IsEnabled *bool `json:"isEnabled,omitempty"`
// RuleType - Possible values include: 'RuleTypeCustomAlertRule', 'RuleTypeThresholdCustomAlertRule', 'RuleTypeTimeWindowCustomAlertRule', 'RuleTypeAllowlistCustomAlertRule', 'RuleTypeDenylistCustomAlertRule', 'RuleTypeListCustomAlertRule', 'RuleTypeConnectionToIPNotAllowed', 'RuleTypeLocalUserNotAllowed', 'RuleTypeProcessNotAllowed', 'RuleTypeActiveConnectionsNotInAllowedRange', 'RuleTypeAmqpC2DMessagesNotInAllowedRange', 'RuleTypeMqttC2DMessagesNotInAllowedRange', 'RuleTypeHTTPC2DMessagesNotInAllowedRange', 'RuleTypeAmqpC2DRejectedMessagesNotInAllowedRange', 'RuleTypeMqttC2DRejectedMessagesNotInAllowedRange', 'RuleTypeHTTPC2DRejectedMessagesNotInAllowedRange', 'RuleTypeAmqpD2CMessagesNotInAllowedRange', 'RuleTypeMqttD2CMessagesNotInAllowedRange', 'RuleTypeHTTPD2CMessagesNotInAllowedRange', 'RuleTypeDirectMethodInvokesNotInAllowedRange', 'RuleTypeFailedLocalLoginsNotInAllowedRange', 'RuleTypeFileUploadsNotInAllowedRange', 'RuleTypeQueuePurgesNotInAllowedRange', 'RuleTypeTwinUpdatesNotInAllowedRange', 'RuleTypeUnauthorizedOperationsNotInAllowedRange'
- RuleType RuleType `json:"ruleType,omitempty"`
+ RuleType RuleTypeBasicCustomAlertRule `json:"ruleType,omitempty"`
}
// MarshalJSON is the custom marshaler for UnauthorizedOperationsNotInAllowedRange.
@@ -16164,6 +16381,27 @@ type UserRecommendation struct {
RecommendationAction RecommendationAction1 `json:"recommendationAction,omitempty"`
}
+// VaRule vulnerability assessment rule metadata details.
+type VaRule struct {
+ // RuleID - The rule Id.
+ RuleID *string `json:"ruleId,omitempty"`
+ // Severity - Possible values include: 'RuleSeverityHigh', 'RuleSeverityMedium', 'RuleSeverityLow', 'RuleSeverityInformational', 'RuleSeverityObsolete'
+ Severity RuleSeverity `json:"severity,omitempty"`
+ // Category - The rule category.
+ Category *string `json:"category,omitempty"`
+ // RuleType - Possible values include: 'Binary', 'BaselineExpected', 'PositiveList', 'NegativeList'
+ RuleType RuleType `json:"ruleType,omitempty"`
+ // Title - The rule title.
+ Title *string `json:"title,omitempty"`
+ // Description - The rule description.
+ Description *string `json:"description,omitempty"`
+ // Rationale - The rule rationale.
+ Rationale *string `json:"rationale,omitempty"`
+ QueryCheck *QueryCheck `json:"queryCheck,omitempty"`
+ // BenchmarkReferences - The benchmark references.
+ BenchmarkReferences *[]BenchmarkReference `json:"benchmarkReferences,omitempty"`
+}
+
// VendorReference vendor reference
type VendorReference struct {
// Title - READ-ONLY; Link title
diff --git a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go
index 1f00cb8ad30d..584a780e56fc 100644
--- a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go
+++ b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go
@@ -23,6 +23,33 @@ import (
"github.com/Azure/go-autorest/autorest"
)
+// SQLVulnerabilityAssessmentScansClientAPI contains the set of methods on the SQLVulnerabilityAssessmentScansClient type.
+type SQLVulnerabilityAssessmentScansClientAPI interface {
+ Get(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (result security.Scan, err error)
+ List(ctx context.Context, workspaceID string, APIVersion string, resourceID string) (result security.Scans, err error)
+}
+
+var _ SQLVulnerabilityAssessmentScansClientAPI = (*security.SQLVulnerabilityAssessmentScansClient)(nil)
+
+// SQLVulnerabilityAssessmentScanResultsClientAPI contains the set of methods on the SQLVulnerabilityAssessmentScanResultsClient type.
+type SQLVulnerabilityAssessmentScanResultsClientAPI interface {
+ Get(ctx context.Context, scanID string, scanResultID string, workspaceID string, APIVersion string, resourceID string) (result security.ScanResult, err error)
+ List(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (result security.ScanResults, err error)
+}
+
+var _ SQLVulnerabilityAssessmentScanResultsClientAPI = (*security.SQLVulnerabilityAssessmentScanResultsClient)(nil)
+
+// SQLVulnerabilityAssessmentBaselineRulesClientAPI contains the set of methods on the SQLVulnerabilityAssessmentBaselineRulesClient type.
+type SQLVulnerabilityAssessmentBaselineRulesClientAPI interface {
+ Add(ctx context.Context, workspaceID string, APIVersion string, resourceID string, body *security.RulesResultsInput) (result security.RulesResults, err error)
+ CreateOrUpdate(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string, body *security.RuleResultsInput) (result security.RuleResults, err error)
+ Delete(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string) (result autorest.Response, err error)
+ Get(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string) (result security.RuleResults, err error)
+ List(ctx context.Context, workspaceID string, APIVersion string, resourceID string) (result security.RulesResults, err error)
+}
+
+var _ SQLVulnerabilityAssessmentBaselineRulesClientAPI = (*security.SQLVulnerabilityAssessmentBaselineRulesClient)(nil)
+
// SecureScoresClientAPI contains the set of methods on the SecureScoresClient type.
type SecureScoresClientAPI interface {
Get(ctx context.Context, secureScoreName string) (result security.SecureScoreItem, err error)
diff --git a/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentbaselinerules.go b/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentbaselinerules.go
new file mode 100644
index 000000000000..4d5d80df050e
--- /dev/null
+++ b/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentbaselinerules.go
@@ -0,0 +1,432 @@
+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"
+)
+
+// SQLVulnerabilityAssessmentBaselineRulesClient is the API spec for Microsoft.Security (Azure Security Center)
+// resource provider
+type SQLVulnerabilityAssessmentBaselineRulesClient struct {
+ BaseClient
+}
+
+// NewSQLVulnerabilityAssessmentBaselineRulesClient creates an instance of the
+// SQLVulnerabilityAssessmentBaselineRulesClient client.
+func NewSQLVulnerabilityAssessmentBaselineRulesClient(subscriptionID string, ascLocation string) SQLVulnerabilityAssessmentBaselineRulesClient {
+ return NewSQLVulnerabilityAssessmentBaselineRulesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation)
+}
+
+// NewSQLVulnerabilityAssessmentBaselineRulesClientWithBaseURI creates an instance of the
+// SQLVulnerabilityAssessmentBaselineRulesClient 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 NewSQLVulnerabilityAssessmentBaselineRulesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SQLVulnerabilityAssessmentBaselineRulesClient {
+ return SQLVulnerabilityAssessmentBaselineRulesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)}
+}
+
+// Add sends the add request.
+// Parameters:
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+// body - the baseline rules.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) Add(ctx context.Context, workspaceID string, APIVersion string, resourceID string, body *RulesResultsInput) (result RulesResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentBaselineRulesClient.Add")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.AddPreparer(ctx, workspaceID, APIVersion, resourceID, body)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Add", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Add", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Add", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddPreparer prepares the Add request.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) AddPreparer(ctx context.Context, workspaceID string, APIVersion string, resourceID string, body *RulesResultsInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if body != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(body))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddSender sends the Add request. The method will close the
+// http.Response Body if it receives an error.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) AddSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddResponder handles the response to the Add request. The method always
+// closes the http.Response Body.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) AddResponder(resp *http.Response) (result RulesResults, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateOrUpdate sends the create or update request.
+// Parameters:
+// ruleID - the rule Id.
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+// body - the baseline results for this rule.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) CreateOrUpdate(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string, body *RuleResultsInput) (result RuleResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentBaselineRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, ruleID, workspaceID, APIVersion, resourceID, body)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) CreateOrUpdatePreparer(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string, body *RuleResultsInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ "ruleId": autorest.Encode("path", ruleID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if body != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(body))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) CreateOrUpdateResponder(resp *http.Response) (result RuleResults, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete sends the delete request.
+// Parameters:
+// ruleID - the rule Id.
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) Delete(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentBaselineRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, ruleID, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) DeletePreparer(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ "ruleId": autorest.Encode("path", ruleID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get sends the get request.
+// Parameters:
+// ruleID - the rule Id.
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) Get(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string) (result RuleResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentBaselineRulesClient.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, ruleID, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "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.SQLVulnerabilityAssessmentBaselineRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) GetPreparer(ctx context.Context, ruleID string, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ "ruleId": autorest.Encode("path", ruleID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{ruleId}", 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 SQLVulnerabilityAssessmentBaselineRulesClient) 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 SQLVulnerabilityAssessmentBaselineRulesClient) GetResponder(resp *http.Response) (result RuleResults, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List sends the list request.
+// Parameters:
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) List(ctx context.Context, workspaceID string, APIVersion string, resourceID string) (result RulesResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentBaselineRulesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentBaselineRulesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SQLVulnerabilityAssessmentBaselineRulesClient) ListPreparer(ctx context.Context, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules", 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 SQLVulnerabilityAssessmentBaselineRulesClient) 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 SQLVulnerabilityAssessmentBaselineRulesClient) ListResponder(resp *http.Response) (result RulesResults, 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/v2.0/security/sqlvulnerabilityassessmentscanresults.go b/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentscanresults.go
new file mode 100644
index 000000000000..a0d9caa08ef9
--- /dev/null
+++ b/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentscanresults.go
@@ -0,0 +1,199 @@
+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"
+)
+
+// SQLVulnerabilityAssessmentScanResultsClient is the API spec for Microsoft.Security (Azure Security Center) resource
+// provider
+type SQLVulnerabilityAssessmentScanResultsClient struct {
+ BaseClient
+}
+
+// NewSQLVulnerabilityAssessmentScanResultsClient creates an instance of the
+// SQLVulnerabilityAssessmentScanResultsClient client.
+func NewSQLVulnerabilityAssessmentScanResultsClient(subscriptionID string, ascLocation string) SQLVulnerabilityAssessmentScanResultsClient {
+ return NewSQLVulnerabilityAssessmentScanResultsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation)
+}
+
+// NewSQLVulnerabilityAssessmentScanResultsClientWithBaseURI creates an instance of the
+// SQLVulnerabilityAssessmentScanResultsClient 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 NewSQLVulnerabilityAssessmentScanResultsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SQLVulnerabilityAssessmentScanResultsClient {
+ return SQLVulnerabilityAssessmentScanResultsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)}
+}
+
+// Get sends the get request.
+// Parameters:
+// scanID - the scan Id. Type 'latest' to get the scan results for the latest scan.
+// scanResultID - the rule Id of the results.
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentScanResultsClient) Get(ctx context.Context, scanID string, scanResultID string, workspaceID string, APIVersion string, resourceID string) (result ScanResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentScanResultsClient.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, scanID, scanResultID, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScanResultsClient", "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.SQLVulnerabilityAssessmentScanResultsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScanResultsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SQLVulnerabilityAssessmentScanResultsClient) GetPreparer(ctx context.Context, scanID string, scanResultID string, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ "scanId": autorest.Encode("path", scanID),
+ "scanResultId": autorest.Encode("path", scanResultID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults/{scanResultId}", 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 SQLVulnerabilityAssessmentScanResultsClient) 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 SQLVulnerabilityAssessmentScanResultsClient) GetResponder(resp *http.Response) (result ScanResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List sends the list request.
+// Parameters:
+// scanID - the scan Id. Type 'latest' to get the scan results for the latest scan.
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentScanResultsClient) List(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (result ScanResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentScanResultsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, scanID, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScanResultsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScanResultsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScanResultsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SQLVulnerabilityAssessmentScanResultsClient) ListPreparer(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ "scanId": autorest.Encode("path", scanID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults", 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 SQLVulnerabilityAssessmentScanResultsClient) 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 SQLVulnerabilityAssessmentScanResultsClient) ListResponder(resp *http.Response) (result ScanResults, 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/v2.0/security/sqlvulnerabilityassessmentscans.go b/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentscans.go
new file mode 100644
index 000000000000..417f3081f74c
--- /dev/null
+++ b/services/preview/security/mgmt/v2.0/security/sqlvulnerabilityassessmentscans.go
@@ -0,0 +1,194 @@
+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"
+)
+
+// SQLVulnerabilityAssessmentScansClient is the API spec for Microsoft.Security (Azure Security Center) resource
+// provider
+type SQLVulnerabilityAssessmentScansClient struct {
+ BaseClient
+}
+
+// NewSQLVulnerabilityAssessmentScansClient creates an instance of the SQLVulnerabilityAssessmentScansClient client.
+func NewSQLVulnerabilityAssessmentScansClient(subscriptionID string, ascLocation string) SQLVulnerabilityAssessmentScansClient {
+ return NewSQLVulnerabilityAssessmentScansClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation)
+}
+
+// NewSQLVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the SQLVulnerabilityAssessmentScansClient
+// 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 NewSQLVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SQLVulnerabilityAssessmentScansClient {
+ return SQLVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)}
+}
+
+// Get sends the get request.
+// Parameters:
+// scanID - the scan Id. Type 'latest' to get the scan record for the latest scan.
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentScansClient) Get(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (result Scan, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentScansClient.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, scanID, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScansClient", "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.SQLVulnerabilityAssessmentScansClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScansClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SQLVulnerabilityAssessmentScansClient) GetPreparer(ctx context.Context, scanID string, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ "scanId": autorest.Encode("path", scanID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}", 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 SQLVulnerabilityAssessmentScansClient) 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 SQLVulnerabilityAssessmentScansClient) GetResponder(resp *http.Response) (result Scan, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List sends the list request.
+// Parameters:
+// workspaceID - the workspace Id.
+// APIVersion - the api version.
+// resourceID - the identifier of the resource.
+func (client SQLVulnerabilityAssessmentScansClient) List(ctx context.Context, workspaceID string, APIVersion string, resourceID string) (result Scans, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SQLVulnerabilityAssessmentScansClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, workspaceID, APIVersion, resourceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScansClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScansClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.SQLVulnerabilityAssessmentScansClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SQLVulnerabilityAssessmentScansClient) ListPreparer(ctx context.Context, workspaceID string, APIVersion string, resourceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "workspaceId": autorest.Encode("query", workspaceID),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans", 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 SQLVulnerabilityAssessmentScansClient) 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 SQLVulnerabilityAssessmentScansClient) ListResponder(resp *http.Response) (result Scans, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}