diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ActionsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ActionsOperations.cs index 2b96c54e0bc51..d74d588b56189 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ActionsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ActionsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// ActionsOperations operations. /// - internal partial class ActionsOperations : IServiceOperations, IActionsOperations + internal partial class ActionsOperations : IServiceOperations, IActionsOperations { /// /// Initializes a new instance of the ActionsOperations class. @@ -36,7 +36,7 @@ internal partial class ActionsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ActionsOperations(SecurityInsightsClient client) + internal ActionsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal ActionsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all actions of alert rule. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRuleTemplatesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRuleTemplatesOperations.cs index f17c3df4d9fca..422cdc0e61c70 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRuleTemplatesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRuleTemplatesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// AlertRuleTemplatesOperations operations. /// - internal partial class AlertRuleTemplatesOperations : IServiceOperations, IAlertRuleTemplatesOperations + internal partial class AlertRuleTemplatesOperations : IServiceOperations, IAlertRuleTemplatesOperations { /// /// Initializes a new instance of the AlertRuleTemplatesOperations class. @@ -36,7 +36,7 @@ internal partial class AlertRuleTemplatesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal AlertRuleTemplatesOperations(SecurityInsightsClient client) + internal AlertRuleTemplatesOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal AlertRuleTemplatesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all alert rule templates. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRulesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRulesOperations.cs index a0fef971c4042..eacafd1cf40ab 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRulesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AlertRulesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// AlertRulesOperations operations. /// - internal partial class AlertRulesOperations : IServiceOperations, IAlertRulesOperations + internal partial class AlertRulesOperations : IServiceOperations, IAlertRulesOperations { /// /// Initializes a new instance of the AlertRulesOperations class. @@ -36,7 +36,7 @@ internal partial class AlertRulesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal AlertRulesOperations(SecurityInsightsClient client) + internal AlertRulesOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal AlertRulesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all alert rules. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperations.cs index 9349b9a661b72..5b527e584adeb 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// AutomationRulesOperations operations. /// - internal partial class AutomationRulesOperations : IServiceOperations, IAutomationRulesOperations + internal partial class AutomationRulesOperations : IServiceOperations, IAutomationRulesOperations { /// /// Initializes a new instance of the AutomationRulesOperations class. @@ -36,7 +36,7 @@ internal partial class AutomationRulesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal AutomationRulesOperations(SecurityInsightsClient client) + internal AutomationRulesOperations(SecurityInsights client) { if (client == null) { @@ -46,12 +46,12 @@ internal AutomationRulesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// - /// Gets all automation rules. + /// Gets the automation rule. /// /// /// The name of the resource group. The name is case insensitive. @@ -59,6 +59,9 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// The name of the workspace. /// + /// + /// Automation rule ID + /// /// /// Headers that will be added to request. /// @@ -80,7 +83,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -134,6 +137,10 @@ internal AutomationRulesOperations(SecurityInsightsClient client) throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); } } + if (automationRuleId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "automationRuleId"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -143,15 +150,17 @@ internal AutomationRulesOperations(SecurityInsightsClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("automationRuleId", automationRuleId); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{automationRuleId}", System.Uri.EscapeDataString(automationRuleId)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -250,7 +259,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -263,7 +272,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -283,7 +292,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) } /// - /// Gets the automation rule. + /// Creates or updates the automation rule. /// /// /// The name of the resource group. The name is case insensitive. @@ -294,6 +303,9 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// Automation rule ID /// + /// + /// The automation rule + /// /// /// Headers that will be added to request. /// @@ -315,7 +327,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRuleToUpsert = default(AutomationRule), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -373,6 +385,10 @@ internal AutomationRulesOperations(SecurityInsightsClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationRuleId"); } + if (automationRuleToUpsert != null) + { + automationRuleToUpsert.Validate(); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -383,8 +399,9 @@ internal AutomationRulesOperations(SecurityInsightsClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); tracingParameters.Add("automationRuleId", automationRuleId); + tracingParameters.Add("automationRuleToUpsert", automationRuleToUpsert); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -405,7 +422,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -436,6 +453,12 @@ internal AutomationRulesOperations(SecurityInsightsClient client) // Serialize Request string _requestContent = null; + if(automationRuleToUpsert != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(automationRuleToUpsert, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -456,7 +479,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -516,6 +539,24 @@ internal AutomationRulesOperations(SecurityInsightsClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -524,7 +565,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) } /// - /// Creates or updates the automation rule. + /// Delete the automation rule. /// /// /// The name of the resource group. The name is case insensitive. @@ -535,9 +576,6 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// Automation rule ID /// - /// - /// The automation rule - /// /// /// Headers that will be added to request. /// @@ -559,7 +597,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRule, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -617,14 +655,6 @@ internal AutomationRulesOperations(SecurityInsightsClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "automationRuleId"); } - if (automationRule == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "automationRule"); - } - if (automationRule != null) - { - automationRule.Validate(); - } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -635,9 +665,8 @@ internal AutomationRulesOperations(SecurityInsightsClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); tracingParameters.Add("automationRuleId", automationRuleId); - tracingParameters.Add("automationRule", automationRule); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -658,7 +687,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -689,12 +718,6 @@ internal AutomationRulesOperations(SecurityInsightsClient client) // Serialize Request string _requestContent = null; - if(automationRule != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(automationRule, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (Client.Credentials != null) { @@ -715,7 +738,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -750,7 +773,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -763,7 +786,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -776,12 +799,12 @@ internal AutomationRulesOperations(SecurityInsightsClient client) } } // Deserialize Response - if ((int)_statusCode == 201) + if ((int)_statusCode == 204) { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -801,7 +824,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) } /// - /// Delete the automation rule. + /// Gets all automation rules. /// /// /// The name of the resource group. The name is case insensitive. @@ -809,8 +832,243 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// The name of the workspace. /// - /// - /// Automation rule ID + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (workspaceName != null) + { + if (workspaceName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "workspaceName", 90); + } + if (workspaceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Triggers playbook on a specific incident + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace. + /// + /// + /// + /// + /// + /// /// /// /// Headers that will be added to request. @@ -821,6 +1079,9 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -830,7 +1091,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ManualTriggerPlaybookWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -884,9 +1145,16 @@ internal AutomationRulesOperations(SecurityInsightsClient client) throw new ValidationException(ValidationRules.MinLength, "workspaceName", 1); } } - if (automationRuleId == null) + if (incidentIdentifier == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "automationRuleId"); + throw new ValidationException(ValidationRules.CannotBeNull, "incidentIdentifier"); + } + ManualTriggerRequestBody requestBody = default(ManualTriggerRequestBody); + if (tenantId != null || logicAppsResourceId != null) + { + requestBody = new ManualTriggerRequestBody(); + requestBody.TenantId = tenantId; + requestBody.LogicAppsResourceId = logicAppsResourceId; } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -897,17 +1165,18 @@ internal AutomationRulesOperations(SecurityInsightsClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); - tracingParameters.Add("automationRuleId", automationRuleId); + tracingParameters.Add("incidentIdentifier", incidentIdentifier); + tracingParameters.Add("requestBody", requestBody); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ManualTriggerPlaybook", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}/runPlaybook").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); - _url = _url.Replace("{automationRuleId}", System.Uri.EscapeDataString(automationRuleId)); + _url = _url.Replace("{incidentIdentifier}", System.Uri.EscapeDataString(incidentIdentifier)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -920,7 +1189,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -951,6 +1220,12 @@ internal AutomationRulesOperations(SecurityInsightsClient client) // Serialize Request string _requestContent = null; + if(requestBody != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(requestBody, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { @@ -971,7 +1246,7 @@ internal AutomationRulesOperations(SecurityInsightsClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1006,13 +1281,31 @@ internal AutomationRulesOperations(SecurityInsightsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 204) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperationsExtensions.cs index 6ec53c6c198b1..93681bc8da134 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/AutomationRulesOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public static partial class AutomationRulesOperationsExtensions { /// - /// Gets all automation rules. + /// Gets the automation rule. /// /// /// The operations group for this extension method. @@ -33,13 +33,16 @@ public static partial class AutomationRulesOperationsExtensions /// /// The name of the workspace. /// - public static IPage List(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName) + /// + /// Automation rule ID + /// + public static AutomationRule Get(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId) { - return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, workspaceName, automationRuleId).GetAwaiter().GetResult(); } /// - /// Gets all automation rules. + /// Gets the automation rule. /// /// /// The operations group for this extension method. @@ -50,19 +53,22 @@ public static IPage List(this IAutomationRulesOperations operati /// /// The name of the workspace. /// + /// + /// Automation rule ID + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, automationRuleId, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets the automation rule. + /// Creates or updates the automation rule. /// /// /// The operations group for this extension method. @@ -76,13 +82,16 @@ public static IPage List(this IAutomationRulesOperations operati /// /// Automation rule ID /// - public static AutomationRule Get(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId) + /// + /// The automation rule + /// + public static AutomationRule CreateOrUpdate(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRuleToUpsert = default(AutomationRule)) { - return operations.GetAsync(resourceGroupName, workspaceName, automationRuleId).GetAwaiter().GetResult(); + return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert).GetAwaiter().GetResult(); } /// - /// Gets the automation rule. + /// Creates or updates the automation rule. /// /// /// The operations group for this extension method. @@ -96,19 +105,22 @@ public static AutomationRule Get(this IAutomationRulesOperations operations, str /// /// Automation rule ID /// + /// + /// The automation rule + /// /// /// The cancellation token. /// - public static async Task GetAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CreateOrUpdateAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRuleToUpsert = default(AutomationRule), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, automationRuleId, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates or updates the automation rule. + /// Delete the automation rule. /// /// /// The operations group for this extension method. @@ -122,16 +134,13 @@ public static AutomationRule Get(this IAutomationRulesOperations operations, str /// /// Automation rule ID /// - /// - /// The automation rule - /// - public static AutomationRule CreateOrUpdate(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRule) + public static object Delete(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId) { - return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRule).GetAwaiter().GetResult(); + return operations.DeleteAsync(resourceGroupName, workspaceName, automationRuleId).GetAwaiter().GetResult(); } /// - /// Creates or updates the automation rule. + /// Delete the automation rule. /// /// /// The operations group for this extension method. @@ -145,22 +154,59 @@ public static AutomationRule CreateOrUpdate(this IAutomationRulesOperations oper /// /// Automation rule ID /// - /// - /// The automation rule + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, automationRuleId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all automation rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace. + /// + public static IPage List(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName) + { + return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + } + + /// + /// Gets all automation rules. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace. /// /// /// The cancellation token. /// - public static async Task CreateOrUpdateAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRule, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, automationRuleId, automationRule, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Delete the automation rule. + /// Triggers playbook on a specific incident /// /// /// The operations group for this extension method. @@ -171,16 +217,19 @@ public static AutomationRule CreateOrUpdate(this IAutomationRulesOperations oper /// /// The name of the workspace. /// - /// - /// Automation rule ID + /// + /// + /// + /// + /// /// - public static void Delete(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId) + public static object ManualTriggerPlaybook(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string)) { - operations.DeleteAsync(resourceGroupName, workspaceName, automationRuleId).GetAwaiter().GetResult(); + return operations.ManualTriggerPlaybookAsync(resourceGroupName, workspaceName, incidentIdentifier, tenantId, logicAppsResourceId).GetAwaiter().GetResult(); } /// - /// Delete the automation rule. + /// Triggers playbook on a specific incident /// /// /// The operations group for this extension method. @@ -191,15 +240,21 @@ public static void Delete(this IAutomationRulesOperations operations, string res /// /// The name of the workspace. /// - /// - /// Automation rule ID + /// + /// + /// + /// + /// /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string automationRuleId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ManualTriggerPlaybookAsync(this IAutomationRulesOperations operations, string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, automationRuleId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ManualTriggerPlaybookWithHttpMessagesAsync(resourceGroupName, workspaceName, incidentIdentifier, tenantId, logicAppsResourceId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs index 8fa86232487fd..4e9346626c3f0 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// BookmarkOperations operations. /// - internal partial class BookmarkOperations : IServiceOperations, IBookmarkOperations + internal partial class BookmarkOperations : IServiceOperations, IBookmarkOperations { /// /// Initializes a new instance of the BookmarkOperations class. @@ -36,7 +36,7 @@ internal partial class BookmarkOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BookmarkOperations(SecurityInsightsClient client) + internal BookmarkOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal BookmarkOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Expand an bookmark diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs index 8e2e841bdba35..91f6924fc2042 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarkRelationsOperations.cs @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// BookmarkRelationsOperations operations. /// - internal partial class BookmarkRelationsOperations : IServiceOperations, IBookmarkRelationsOperations + internal partial class BookmarkRelationsOperations : IServiceOperations, IBookmarkRelationsOperations { /// /// Initializes a new instance of the BookmarkRelationsOperations class. @@ -37,7 +37,7 @@ internal partial class BookmarkRelationsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BookmarkRelationsOperations(SecurityInsightsClient client) + internal BookmarkRelationsOperations(SecurityInsights client) { if (client == null) { @@ -47,9 +47,9 @@ internal BookmarkRelationsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all bookmark relations. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarksOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarksOperations.cs index 6448169b72188..b47656c600ecf 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarksOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/BookmarksOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// BookmarksOperations operations. /// - internal partial class BookmarksOperations : IServiceOperations, IBookmarksOperations + internal partial class BookmarksOperations : IServiceOperations, IBookmarksOperations { /// /// Initializes a new instance of the BookmarksOperations class. @@ -36,7 +36,7 @@ internal partial class BookmarksOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BookmarksOperations(SecurityInsightsClient client) + internal BookmarksOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal BookmarksOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all bookmarks. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs index dc2808839a068..c133cc2118c16 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsCheckRequirementsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// DataConnectorsCheckRequirementsOperations operations. /// - internal partial class DataConnectorsCheckRequirementsOperations : IServiceOperations, IDataConnectorsCheckRequirementsOperations + internal partial class DataConnectorsCheckRequirementsOperations : IServiceOperations, IDataConnectorsCheckRequirementsOperations { /// /// Initializes a new instance of the DataConnectorsCheckRequirementsOperations class. @@ -36,7 +36,7 @@ internal partial class DataConnectorsCheckRequirementsOperations : IServiceOpera /// /// Thrown when a required parameter is null /// - internal DataConnectorsCheckRequirementsOperations(SecurityInsightsClient client) + internal DataConnectorsCheckRequirementsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal DataConnectorsCheckRequirementsOperations(SecurityInsightsClient client } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Get requirements state for a data connector type. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs index 9a8435f958dbf..9c265a009a55e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DataConnectorsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// DataConnectorsOperations operations. /// - internal partial class DataConnectorsOperations : IServiceOperations, IDataConnectorsOperations + internal partial class DataConnectorsOperations : IServiceOperations, IDataConnectorsOperations { /// /// Initializes a new instance of the DataConnectorsOperations class. @@ -36,7 +36,7 @@ internal partial class DataConnectorsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal DataConnectorsOperations(SecurityInsightsClient client) + internal DataConnectorsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal DataConnectorsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all data connectors. @@ -1037,7 +1037,7 @@ internal DataConnectorsOperations(SecurityInsightsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1203,13 +1203,14 @@ internal DataConnectorsOperations(SecurityInsightsClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1219,6 +1220,10 @@ internal DataConnectorsOperations(SecurityInsightsClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -1263,7 +1268,7 @@ internal DataConnectorsOperations(SecurityInsightsClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1418,13 +1423,14 @@ internal DataConnectorsOperations(SecurityInsightsClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1434,6 +1440,10 @@ internal DataConnectorsOperations(SecurityInsightsClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs index 4e8e6ef93d310..5c08def4a2e44 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/DomainWhoisOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// DomainWhoisOperations operations. /// - internal partial class DomainWhoisOperations : IServiceOperations, IDomainWhoisOperations + internal partial class DomainWhoisOperations : IServiceOperations, IDomainWhoisOperations { /// /// Initializes a new instance of the DomainWhoisOperations class. @@ -36,7 +36,7 @@ internal partial class DomainWhoisOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal DomainWhoisOperations(SecurityInsightsClient client) + internal DomainWhoisOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal DomainWhoisOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Get whois information for a single domain name diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs index a8199a33ed666..0c6e41b263c67 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesGetTimelineOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// EntitiesGetTimelineOperations operations. /// - internal partial class EntitiesGetTimelineOperations : IServiceOperations, IEntitiesGetTimelineOperations + internal partial class EntitiesGetTimelineOperations : IServiceOperations, IEntitiesGetTimelineOperations { /// /// Initializes a new instance of the EntitiesGetTimelineOperations class. @@ -36,7 +36,7 @@ internal partial class EntitiesGetTimelineOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntitiesGetTimelineOperations(SecurityInsightsClient client) + internal EntitiesGetTimelineOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal EntitiesGetTimelineOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Timeline for an entity. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs index 887590e35c205..bdf70d9b958e4 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// EntitiesOperations operations. /// - internal partial class EntitiesOperations : IServiceOperations, IEntitiesOperations + internal partial class EntitiesOperations : IServiceOperations, IEntitiesOperations { /// /// Initializes a new instance of the EntitiesOperations class. @@ -36,7 +36,7 @@ internal partial class EntitiesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntitiesOperations(SecurityInsightsClient client) + internal EntitiesOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal EntitiesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all entities. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs index 6c37b03fc81f9..3821405ef9ce7 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntitiesRelationsOperations.cs @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// EntitiesRelationsOperations operations. /// - internal partial class EntitiesRelationsOperations : IServiceOperations, IEntitiesRelationsOperations + internal partial class EntitiesRelationsOperations : IServiceOperations, IEntitiesRelationsOperations { /// /// Initializes a new instance of the EntitiesRelationsOperations class. @@ -37,7 +37,7 @@ internal partial class EntitiesRelationsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntitiesRelationsOperations(SecurityInsightsClient client) + internal EntitiesRelationsOperations(SecurityInsights client) { if (client == null) { @@ -47,9 +47,9 @@ internal EntitiesRelationsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all relations of an entity. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs index b15302ace52c4..9a749a3cc3225 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueriesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// EntityQueriesOperations operations. /// - internal partial class EntityQueriesOperations : IServiceOperations, IEntityQueriesOperations + internal partial class EntityQueriesOperations : IServiceOperations, IEntityQueriesOperations { /// /// Initializes a new instance of the EntityQueriesOperations class. @@ -36,7 +36,7 @@ internal partial class EntityQueriesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntityQueriesOperations(SecurityInsightsClient client) + internal EntityQueriesOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal EntityQueriesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all entity queries. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs index 2b0938cb95f2d..14011393b0d7a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityQueryTemplatesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// EntityQueryTemplatesOperations operations. /// - internal partial class EntityQueryTemplatesOperations : IServiceOperations, IEntityQueryTemplatesOperations + internal partial class EntityQueryTemplatesOperations : IServiceOperations, IEntityQueryTemplatesOperations { /// /// Initializes a new instance of the EntityQueryTemplatesOperations class. @@ -36,7 +36,7 @@ internal partial class EntityQueryTemplatesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntityQueryTemplatesOperations(SecurityInsightsClient client) + internal EntityQueryTemplatesOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal EntityQueryTemplatesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all entity query templates. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs index 0dcd0ca2c60bb..428fb38c44f1c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/EntityRelationsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// EntityRelationsOperations operations. /// - internal partial class EntityRelationsOperations : IServiceOperations, IEntityRelationsOperations + internal partial class EntityRelationsOperations : IServiceOperations, IEntityRelationsOperations { /// /// Initializes a new instance of the EntityRelationsOperations class. @@ -36,7 +36,7 @@ internal partial class EntityRelationsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal EntityRelationsOperations(SecurityInsightsClient client) + internal EntityRelationsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal EntityRelationsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets an entity relation. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IAutomationRulesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IAutomationRulesOperations.cs index c0a65056b9e39..c5409ceed9682 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IAutomationRulesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IAutomationRulesOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.SecurityInsights public partial interface IAutomationRulesOperations { /// - /// Gets all automation rules. + /// Gets the automation rule. /// /// /// The name of the resource group. The name is case insensitive. @@ -32,6 +32,9 @@ public partial interface IAutomationRulesOperations /// /// The name of the workspace. /// + /// + /// Automation rule ID + /// /// /// The headers that will be added to request. /// @@ -47,9 +50,9 @@ public partial interface IAutomationRulesOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets the automation rule. + /// Creates or updates the automation rule. /// /// /// The name of the resource group. The name is case insensitive. @@ -60,6 +63,9 @@ public partial interface IAutomationRulesOperations /// /// Automation rule ID /// + /// + /// The automation rule + /// /// /// The headers that will be added to request. /// @@ -75,9 +81,9 @@ public partial interface IAutomationRulesOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRuleToUpsert = default(AutomationRule), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates the automation rule. + /// Delete the automation rule. /// /// /// The name of the resource group. The name is case insensitive. @@ -88,8 +94,30 @@ public partial interface IAutomationRulesOperations /// /// Automation rule ID /// - /// - /// The automation rule + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all automation rules. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace. /// /// /// The headers that will be added to request. @@ -106,9 +134,9 @@ public partial interface IAutomationRulesOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, AutomationRule automationRule, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete the automation rule. + /// Triggers playbook on a specific incident /// /// /// The name of the resource group. The name is case insensitive. @@ -116,8 +144,11 @@ public partial interface IAutomationRulesOperations /// /// The name of the workspace. /// - /// - /// Automation rule ID + /// + /// + /// + /// + /// /// /// /// The headers that will be added to request. @@ -128,10 +159,13 @@ public partial interface IAutomationRulesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string automationRuleId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ManualTriggerPlaybookWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string incidentIdentifier, System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all automation rules. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs index fdcb66d7941bf..1cb78903bcf73 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IDataConnectorsOperations.cs @@ -153,7 +153,7 @@ public partial interface IDataConnectorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -178,7 +178,7 @@ public partial interface IDataConnectorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs index e1a36829d4b5c..9ecfbdce7dd0e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IPGeodataOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// IPGeodataOperations operations. /// - internal partial class IPGeodataOperations : IServiceOperations, IIPGeodataOperations + internal partial class IPGeodataOperations : IServiceOperations, IIPGeodataOperations { /// /// Initializes a new instance of the IPGeodataOperations class. @@ -36,7 +36,7 @@ internal partial class IPGeodataOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal IPGeodataOperations(SecurityInsightsClient client) + internal IPGeodataOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal IPGeodataOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Get geodata for a single IP address diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsightsClient.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs similarity index 98% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsightsClient.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs index 27a082817ee66..ebcaeeef31f84 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsightsClient.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ISecurityInsights.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// API spec for Microsoft.SecurityInsights (Azure Security Insights) /// resource provider /// - public partial interface ISecurityInsightsClient : System.IDisposable + public partial interface ISecurityInsights : System.IDisposable { /// /// The base URI of the service. @@ -115,11 +115,6 @@ public partial interface ISecurityInsightsClient : System.IDisposable /// IDomainWhoisOperations DomainWhois { get; } - /// - /// Gets the IEntityQueriesOperations. - /// - IEntityQueriesOperations EntityQueries { get; } - /// /// Gets the IEntitiesOperations. /// @@ -140,6 +135,16 @@ public partial interface ISecurityInsightsClient : System.IDisposable /// IEntityRelationsOperations EntityRelations { get; } + /// + /// Gets the IEntityQueriesOperations. + /// + IEntityQueriesOperations EntityQueries { get; } + + /// + /// Gets the IEntityQueryTemplatesOperations. + /// + IEntityQueryTemplatesOperations EntityQueryTemplates { get; } + /// /// Gets the IIncidentsOperations. /// @@ -160,6 +165,11 @@ public partial interface ISecurityInsightsClient : System.IDisposable /// IMetadataOperations Metadata { get; } + /// + /// Gets the IOfficeConsentsOperations. + /// + IOfficeConsentsOperations OfficeConsents { get; } + /// /// Gets the ISentinelOnboardingStatesOperations. /// @@ -181,54 +191,44 @@ public partial interface ISecurityInsightsClient : System.IDisposable ISourceControlsOperations SourceControls { get; } /// - /// Gets the IWatchlistsOperations. + /// Gets the IThreatIntelligenceIndicatorOperations. /// - IWatchlistsOperations Watchlists { get; } + IThreatIntelligenceIndicatorOperations ThreatIntelligenceIndicator { get; } /// - /// Gets the IWatchlistItemsOperations. + /// Gets the IThreatIntelligenceIndicatorsOperations. /// - IWatchlistItemsOperations WatchlistItems { get; } + IThreatIntelligenceIndicatorsOperations ThreatIntelligenceIndicators { get; } /// - /// Gets the IDataConnectorsOperations. + /// Gets the IThreatIntelligenceIndicatorMetricsOperations. /// - IDataConnectorsOperations DataConnectors { get; } + IThreatIntelligenceIndicatorMetricsOperations ThreatIntelligenceIndicatorMetrics { get; } /// - /// Gets the IDataConnectorsCheckRequirementsOperations. + /// Gets the IWatchlistsOperations. /// - IDataConnectorsCheckRequirementsOperations DataConnectorsCheckRequirements { get; } + IWatchlistsOperations Watchlists { get; } /// - /// Gets the IThreatIntelligenceIndicatorOperations. + /// Gets the IWatchlistItemsOperations. /// - IThreatIntelligenceIndicatorOperations ThreatIntelligenceIndicator { get; } + IWatchlistItemsOperations WatchlistItems { get; } /// - /// Gets the IThreatIntelligenceIndicatorsOperations. + /// Gets the IDataConnectorsOperations. /// - IThreatIntelligenceIndicatorsOperations ThreatIntelligenceIndicators { get; } + IDataConnectorsOperations DataConnectors { get; } /// - /// Gets the IThreatIntelligenceIndicatorMetricsOperations. + /// Gets the IDataConnectorsCheckRequirementsOperations. /// - IThreatIntelligenceIndicatorMetricsOperations ThreatIntelligenceIndicatorMetrics { get; } + IDataConnectorsCheckRequirementsOperations DataConnectorsCheckRequirements { get; } /// /// Gets the IOperations. /// IOperations Operations { get; } - /// - /// Gets the IOfficeConsentsOperations. - /// - IOfficeConsentsOperations OfficeConsents { get; } - - /// - /// Gets the IEntityQueryTemplatesOperations. - /// - IEntityQueryTemplatesOperations EntityQueryTemplates { get; } - } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs index c1ba1495ce662..838c99b07be66 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistItemsOperations.cs @@ -35,6 +35,13 @@ public partial interface IWatchlistItemsOperations /// /// Watchlist Alias /// + /// + /// Skiptoken is only used if a previous operation returned a partial + /// result. If a previous response contains a nextLink element, the + /// value of the nextLink element will include a skiptoken parameter + /// that specifies a starting point to use for subsequent calls. + /// Optional. + /// /// /// The headers that will be added to request. /// @@ -50,7 +57,7 @@ public partial interface IWatchlistItemsOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a watchlist, without its watchlist items. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs index 0fb9b8cad0696..0dea129920a27 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IWatchlistsOperations.cs @@ -32,6 +32,13 @@ public partial interface IWatchlistsOperations /// /// The name of the workspace. /// + /// + /// Skiptoken is only used if a previous operation returned a partial + /// result. If a previous response contains a nextLink element, the + /// value of the nextLink element will include a skiptoken parameter + /// that specifies a starting point to use for subsequent calls. + /// Optional. + /// /// /// The headers that will be added to request. /// @@ -47,7 +54,7 @@ public partial interface IWatchlistsOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a watchlist, without its watchlist items. /// @@ -97,15 +104,23 @@ public partial interface IWatchlistsOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Creates or updates a watchlist and its watchlist items (bulk + /// Create or update a Watchlist and its Watchlist Items (bulk /// creation, e.g. through text/csv content type). To create a - /// Watchlist and its items, we should call this endpoint with - /// rawContent and contentType properties. + /// Watchlist and its Items, we should call this endpoint with either + /// rawContent or a valid SAR URI and contentType properties. The + /// rawContent is mainly used for small watchlist (content size below + /// 3.8 MB). The SAS URI enables the creation of large watchlist, where + /// the content size can go up to 500 MB. The status of processing such + /// large file can be polled through the URL returned in + /// Azure-AsyncOperation header. /// /// /// The name of the resource group. The name is case insensitive. @@ -134,7 +149,7 @@ public partial interface IWatchlistsOperations /// /// Thrown when a required parameter is null /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all watchlists, without watchlist items. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs index 8d71938579691..20668fe8068b2 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentCommentsOperations.cs @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// IncidentCommentsOperations operations. /// - internal partial class IncidentCommentsOperations : IServiceOperations, IIncidentCommentsOperations + internal partial class IncidentCommentsOperations : IServiceOperations, IIncidentCommentsOperations { /// /// Initializes a new instance of the IncidentCommentsOperations class. @@ -37,7 +37,7 @@ internal partial class IncidentCommentsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal IncidentCommentsOperations(SecurityInsightsClient client) + internal IncidentCommentsOperations(SecurityInsights client) { if (client == null) { @@ -47,9 +47,9 @@ internal IncidentCommentsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all incident comments. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs index 8420c69cd761d..a9f18a98b415b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentRelationsOperations.cs @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// IncidentRelationsOperations operations. /// - internal partial class IncidentRelationsOperations : IServiceOperations, IIncidentRelationsOperations + internal partial class IncidentRelationsOperations : IServiceOperations, IIncidentRelationsOperations { /// /// Initializes a new instance of the IncidentRelationsOperations class. @@ -37,7 +37,7 @@ internal partial class IncidentRelationsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal IncidentRelationsOperations(SecurityInsightsClient client) + internal IncidentRelationsOperations(SecurityInsights client) { if (client == null) { @@ -47,9 +47,9 @@ internal IncidentRelationsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all incident relations. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs index 207a7a572ed30..28342f579bcc3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/IncidentsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// IncidentsOperations operations. /// - internal partial class IncidentsOperations : IServiceOperations, IIncidentsOperations + internal partial class IncidentsOperations : IServiceOperations, IIncidentsOperations { /// /// Initializes a new instance of the IncidentsOperations class. @@ -36,7 +36,7 @@ internal partial class IncidentsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal IncidentsOperations(SecurityInsightsClient client) + internal IncidentsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal IncidentsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all incidents. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs index fa9c23e4bcf0b..45ebdac256b03 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/MetadataOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// MetadataOperations operations. /// - internal partial class MetadataOperations : IServiceOperations, IMetadataOperations + internal partial class MetadataOperations : IServiceOperations, IMetadataOperations { /// /// Initializes a new instance of the MetadataOperations class. @@ -36,7 +36,7 @@ internal partial class MetadataOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal MetadataOperations(SecurityInsightsClient client) + internal MetadataOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal MetadataOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// List of all metadata diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionType.cs new file mode 100644 index 0000000000000..85859a492f2c2 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ActionType.cs @@ -0,0 +1,28 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for ActionType. + /// + public static class ActionType + { + /// + /// Modify an object's properties + /// + public const string ModifyProperties = "ModifyProperties"; + /// + /// Run a playbook on an object + /// + public const string RunPlaybook = "RunPlaybook"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRule.cs index 632d19b54e41b..a3f1fddbbe604 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRule.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Alert rule. + /// Alert rule. /// public partial class AlertRule : ResourceWithEtag { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs new file mode 100644 index 0000000000000..3482cc6859552 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AlertRuleTemplateWithMitreProperties.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Alert rule template with MITRE property bag. + /// + public partial class AlertRuleTemplateWithMitreProperties : AlertRuleTemplatePropertiesBase + { + /// + /// Initializes a new instance of the + /// AlertRuleTemplateWithMitreProperties class. + /// + public AlertRuleTemplateWithMitreProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AlertRuleTemplateWithMitreProperties class. + /// + /// the number of alert + /// rules that were created by this template + /// The last time that this alert rule + /// template has been updated. + /// The time that this alert rule template + /// has been added. + /// The description of the alert rule + /// template. + /// The display name for alert rule + /// template. + /// The required data sources for + /// this template + /// The alert rule template status. Possible + /// values include: 'Installed', 'Available', 'NotAvailable' + /// The tactics of the alert rule + /// The techniques of the alert rule + public AlertRuleTemplateWithMitreProperties(int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) + : base(alertRulesCreatedByTemplateCount, lastUpdatedDateUTC, createdDateUTC, description, displayName, requiredDataConnectors, status) + { + Tactics = tactics; + Techniques = techniques; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "techniques")] + public IList Techniques { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AttackTactic.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AttackTactic.cs index c796fa0bef63c..9c523924d7184 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AttackTactic.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AttackTactic.cs @@ -16,6 +16,8 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models /// public static class AttackTactic { + public const string Reconnaissance = "Reconnaissance"; + public const string ResourceDevelopment = "ResourceDevelopment"; public const string InitialAccess = "InitialAccess"; public const string Execution = "Execution"; public const string Persistence = "Persistence"; @@ -29,5 +31,7 @@ public static class AttackTactic public const string CommandAndControl = "CommandAndControl"; public const string Impact = "Impact"; public const string PreAttack = "PreAttack"; + public const string ImpairProcessControl = "ImpairProcessControl"; + public const string InhibitResponseFunction = "InhibitResponseFunction"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs index 0c470d5ad24fc..4e688c9d7b37b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRule.cs @@ -17,9 +17,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Collections.Generic; using System.Linq; - /// - /// Represents an automation rule. - /// [Rest.Serialization.JsonTransformation] public partial class AutomationRule : ResourceWithEtag { @@ -39,8 +36,6 @@ public AutomationRule() /// rule /// The order of execution of the automation /// rule - /// The triggering logic of the - /// automation rule /// The actions to execute when the automation /// rule is triggered /// Fully qualified resource ID for the resource. Ex - @@ -52,25 +47,21 @@ public AutomationRule() /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. /// Etag of the azure resource - /// The time the automation rule was - /// created /// The last time the automation rule /// was updated - /// Describes the client that created the - /// automation rule - /// Describes the client that last updated - /// the automation rule - public AutomationRule(string displayName, int order, AutomationRuleTriggeringLogic triggeringLogic, IList actions, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? createdTimeUtc = default(System.DateTime?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), ClientInfo createdBy = default(ClientInfo), ClientInfo lastModifiedBy = default(ClientInfo)) + /// The time the automation rule was + /// created + public AutomationRule(string displayName, int order, AutomationRuleTriggeringLogic triggeringLogic, IList actions, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), System.DateTime? createdTimeUtc = default(System.DateTime?), ClientInfo lastModifiedBy = default(ClientInfo), ClientInfo createdBy = default(ClientInfo)) : base(id, name, type, systemData, etag) { DisplayName = displayName; Order = order; TriggeringLogic = triggeringLogic; Actions = actions; - CreatedTimeUtc = createdTimeUtc; LastModifiedTimeUtc = lastModifiedTimeUtc; - CreatedBy = createdBy; + CreatedTimeUtc = createdTimeUtc; LastModifiedBy = lastModifiedBy; + CreatedBy = createdBy; CustomInit(); } @@ -80,7 +71,7 @@ public AutomationRule() partial void CustomInit(); /// - /// Gets or sets the display name of the automation rule + /// Gets or sets the display name of the automation rule /// [JsonProperty(PropertyName = "properties.displayName")] public string DisplayName { get; set; } @@ -92,7 +83,6 @@ public AutomationRule() public int Order { get; set; } /// - /// Gets or sets the triggering logic of the automation rule /// [JsonProperty(PropertyName = "properties.triggeringLogic")] public AutomationRuleTriggeringLogic TriggeringLogic { get; set; } @@ -104,12 +94,6 @@ public AutomationRule() [JsonProperty(PropertyName = "properties.actions")] public IList Actions { get; set; } - /// - /// Gets the time the automation rule was created - /// - [JsonProperty(PropertyName = "properties.createdTimeUtc")] - public System.DateTime? CreatedTimeUtc { get; private set; } - /// /// Gets the last time the automation rule was updated /// @@ -117,17 +101,21 @@ public AutomationRule() public System.DateTime? LastModifiedTimeUtc { get; private set; } /// - /// Gets describes the client that created the automation rule + /// Gets the time the automation rule was created /// - [JsonProperty(PropertyName = "properties.createdBy")] - public ClientInfo CreatedBy { get; private set; } + [JsonProperty(PropertyName = "properties.createdTimeUtc")] + public System.DateTime? CreatedTimeUtc { get; private set; } /// - /// Gets describes the client that last updated the automation rule /// [JsonProperty(PropertyName = "properties.lastModifiedBy")] public ClientInfo LastModifiedBy { get; private set; } + /// + /// + [JsonProperty(PropertyName = "properties.createdBy")] + public ClientInfo CreatedBy { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs index e1fbcd0306ffe..8cbf8dfe910ee 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleAction.cs @@ -29,8 +29,6 @@ public AutomationRuleAction() /// /// Initializes a new instance of the AutomationRuleAction class. /// - /// The order of execution of the automation rule - /// action public AutomationRuleAction(int order) { Order = order; @@ -43,7 +41,6 @@ public AutomationRuleAction(int order) partial void CustomInit(); /// - /// Gets or sets the order of execution of the automation rule action /// [JsonProperty(PropertyName = "order")] public int Order { get; set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.cs index eb45d31b32446..e84a3cb4121b6 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.cs @@ -11,13 +11,17 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// /// Describes an automation rule action to modify an object's properties /// [Newtonsoft.Json.JsonObject("ModifyProperties")] + [Rest.Serialization.JsonTransformation] public partial class AutomationRuleModifyPropertiesAction : AutomationRuleAction { /// @@ -33,14 +37,29 @@ public AutomationRuleModifyPropertiesAction() /// Initializes a new instance of the /// AutomationRuleModifyPropertiesAction class. /// - /// The order of execution of the automation rule - /// action - /// The configuration of the modify - /// properties automation rule action - public AutomationRuleModifyPropertiesAction(int order, AutomationRuleModifyPropertiesActionActionConfiguration actionConfiguration) + /// Possible values include: 'High', 'Medium', + /// 'Low', 'Informational' + /// Possible values include: 'New', 'Active', + /// 'Closed' + /// Possible values include: + /// 'Undetermined', 'TruePositive', 'BenignPositive', + /// 'FalsePositive' + /// Possible values include: + /// 'SuspiciousActivity', 'SuspiciousButExpected', + /// 'IncorrectAlertLogic', 'InaccurateData' + /// Describes the reason the + /// incident was closed + /// List of labels to add to the incident + public AutomationRuleModifyPropertiesAction(int order, string severity = default(string), string status = default(string), string classification = default(string), string classificationReason = default(string), string classificationComment = default(string), IncidentOwnerInfo owner = default(IncidentOwnerInfo), IList labels = default(IList)) : base(order) { - ActionConfiguration = actionConfiguration; + Severity = severity; + Status = status; + Classification = classification; + ClassificationReason = classificationReason; + ClassificationComment = classificationComment; + Owner = owner; + Labels = labels; CustomInit(); } @@ -50,11 +69,48 @@ public AutomationRuleModifyPropertiesAction(int order, AutomationRuleModifyPrope partial void CustomInit(); /// - /// Gets or sets the configuration of the modify properties automation - /// rule action + /// Gets or sets possible values include: 'High', 'Medium', 'Low', + /// 'Informational' /// - [JsonProperty(PropertyName = "actionConfiguration")] - public AutomationRuleModifyPropertiesActionActionConfiguration ActionConfiguration { get; set; } + [JsonProperty(PropertyName = "actionConfiguration.severity")] + public string Severity { get; set; } + + /// + /// Gets or sets possible values include: 'New', 'Active', 'Closed' + /// + [JsonProperty(PropertyName = "actionConfiguration.status")] + public string Status { get; set; } + + /// + /// Gets or sets possible values include: 'Undetermined', + /// 'TruePositive', 'BenignPositive', 'FalsePositive' + /// + [JsonProperty(PropertyName = "actionConfiguration.classification")] + public string Classification { get; set; } + + /// + /// Gets or sets possible values include: 'SuspiciousActivity', + /// 'SuspiciousButExpected', 'IncorrectAlertLogic', 'InaccurateData' + /// + [JsonProperty(PropertyName = "actionConfiguration.classificationReason")] + public string ClassificationReason { get; set; } + + /// + /// Gets or sets describes the reason the incident was closed + /// + [JsonProperty(PropertyName = "actionConfiguration.classificationComment")] + public string ClassificationComment { get; set; } + + /// + /// + [JsonProperty(PropertyName = "actionConfiguration.owner")] + public IncidentOwnerInfo Owner { get; set; } + + /// + /// Gets or sets list of labels to add to the incident + /// + [JsonProperty(PropertyName = "actionConfiguration.labels")] + public IList Labels { get; set; } /// /// Validate the object. @@ -65,9 +121,15 @@ public AutomationRuleModifyPropertiesAction(int order, AutomationRuleModifyPrope public override void Validate() { base.Validate(); - if (ActionConfiguration == null) + if (Labels != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ActionConfiguration"); + foreach (var element in Labels) + { + if (element != null) + { + element.Validate(); + } + } } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesActionActionConfiguration.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesActionActionConfiguration.cs deleted file mode 100644 index 19b1f7c475354..0000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesActionActionConfiguration.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration of the modify properties automation rule action - /// - public partial class AutomationRuleModifyPropertiesActionActionConfiguration - { - /// - /// Initializes a new instance of the - /// AutomationRuleModifyPropertiesActionActionConfiguration class. - /// - public AutomationRuleModifyPropertiesActionActionConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AutomationRuleModifyPropertiesActionActionConfiguration class. - /// - /// The reason the incident was closed. - /// Possible values include: 'Undetermined', 'TruePositive', - /// 'BenignPositive', 'FalsePositive' - /// Describes the reason the - /// incident was closed - /// The classification reason the - /// incident was closed with. Possible values include: - /// 'SuspiciousActivity', 'SuspiciousButExpected', - /// 'IncorrectAlertLogic', 'InaccurateData' - /// List of labels to add to the incident - /// Describes a user that the incident is assigned - /// to - /// The severity of the incident. Possible - /// values include: 'High', 'Medium', 'Low', 'Informational' - /// The status of the incident. Possible values - /// include: 'New', 'Active', 'Closed' - public AutomationRuleModifyPropertiesActionActionConfiguration(string classification = default(string), string classificationComment = default(string), string classificationReason = default(string), IList labels = default(IList), IncidentOwnerInfo owner = default(IncidentOwnerInfo), string severity = default(string), string status = default(string)) - { - Classification = classification; - ClassificationComment = classificationComment; - ClassificationReason = classificationReason; - Labels = labels; - Owner = owner; - Severity = severity; - Status = status; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the reason the incident was closed. Possible values - /// include: 'Undetermined', 'TruePositive', 'BenignPositive', - /// 'FalsePositive' - /// - [JsonProperty(PropertyName = "classification")] - public string Classification { get; set; } - - /// - /// Gets or sets describes the reason the incident was closed - /// - [JsonProperty(PropertyName = "classificationComment")] - public string ClassificationComment { get; set; } - - /// - /// Gets or sets the classification reason the incident was closed - /// with. Possible values include: 'SuspiciousActivity', - /// 'SuspiciousButExpected', 'IncorrectAlertLogic', 'InaccurateData' - /// - [JsonProperty(PropertyName = "classificationReason")] - public string ClassificationReason { get; set; } - - /// - /// Gets or sets list of labels to add to the incident - /// - [JsonProperty(PropertyName = "labels")] - public IList Labels { get; set; } - - /// - /// Gets or sets describes a user that the incident is assigned to - /// - [JsonProperty(PropertyName = "owner")] - public IncidentOwnerInfo Owner { get; set; } - - /// - /// Gets or sets the severity of the incident. Possible values include: - /// 'High', 'Medium', 'Low', 'Informational' - /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } - - /// - /// Gets or sets the status of the incident. Possible values include: - /// 'New', 'Active', 'Closed' - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs index 2c04b42ab87fc..64c9fbc6512e8 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyConditionSupportedProperty.cs @@ -33,13 +33,17 @@ public static class AutomationRulePropertyConditionSupportedProperty /// public const string IncidentStatus = "IncidentStatus"; /// + /// The related Analytic rule ids of the incident + /// + public const string IncidentRelatedAnalyticRuleIds = "IncidentRelatedAnalyticRuleIds"; + /// /// The tactics of the incident /// public const string IncidentTactics = "IncidentTactics"; /// - /// The related Analytic rule ids of the incident + /// The labels of the incident /// - public const string IncidentRelatedAnalyticRuleIds = "IncidentRelatedAnalyticRuleIds"; + public const string IncidentLabel = "IncidentLabel"; /// /// The provider name of the incident /// @@ -49,7 +53,7 @@ public static class AutomationRulePropertyConditionSupportedProperty /// public const string AccountAadTenantId = "AccountAadTenantId"; /// - /// The account Azure Active Directory user id. + /// The account Azure Active Directory user id /// public const string AccountAadUserId = "AccountAadUserId"; /// @@ -77,6 +81,10 @@ public static class AutomationRulePropertyConditionSupportedProperty /// public const string AccountUPNSuffix = "AccountUPNSuffix"; /// + /// The name of the product of the alert + /// + public const string AlertProductNames = "AlertProductNames"; + /// /// The Azure resource id /// public const string AzureResourceResourceId = "AzureResourceResourceId"; @@ -129,7 +137,7 @@ public static class AutomationRulePropertyConditionSupportedProperty /// public const string HostOSVersion = "HostOSVersion"; /// - /// The IoT device id + /// "The IoT device id /// public const string IoTDeviceId = "IoTDeviceId"; /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesConditionConditionProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesConditionConditionProperties.cs deleted file mode 100644 index 649478fa28cd4..0000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesConditionConditionProperties.cs +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration of the automation rule condition - /// - public partial class AutomationRulePropertyValuesConditionConditionProperties - { - /// - /// Initializes a new instance of the - /// AutomationRulePropertyValuesConditionConditionProperties class. - /// - public AutomationRulePropertyValuesConditionConditionProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AutomationRulePropertyValuesConditionConditionProperties class. - /// - /// The property to evaluate. Possible - /// values include: 'IncidentTitle', 'IncidentDescription', - /// 'IncidentSeverity', 'IncidentStatus', 'IncidentTactics', - /// 'IncidentRelatedAnalyticRuleIds', 'IncidentProviderName', - /// 'AccountAadTenantId', 'AccountAadUserId', 'AccountName', - /// 'AccountNTDomain', 'AccountPUID', 'AccountSid', - /// 'AccountObjectGuid', 'AccountUPNSuffix', 'AzureResourceResourceId', - /// 'AzureResourceSubscriptionId', 'CloudApplicationAppId', - /// 'CloudApplicationAppName', 'DNSDomainName', 'FileDirectory', - /// 'FileName', 'FileHashValue', 'HostAzureID', 'HostName', - /// 'HostNetBiosName', 'HostNTDomain', 'HostOSVersion', 'IoTDeviceId', - /// 'IoTDeviceName', 'IoTDeviceType', 'IoTDeviceVendor', - /// 'IoTDeviceModel', 'IoTDeviceOperatingSystem', 'IPAddress', - /// 'MailboxDisplayName', 'MailboxPrimaryAddress', 'MailboxUPN', - /// 'MailMessageDeliveryAction', 'MailMessageDeliveryLocation', - /// 'MailMessageRecipient', 'MailMessageSenderIP', - /// 'MailMessageSubject', 'MailMessageP1Sender', 'MailMessageP2Sender', - /// 'MalwareCategory', 'MalwareName', 'ProcessCommandLine', - /// 'ProcessId', 'RegistryKey', 'RegistryValueData', 'Url' - /// The operator to use for evaluation - /// the condition. Possible values include: 'Equals', 'NotEquals', - /// 'Contains', 'NotContains', 'StartsWith', 'NotStartsWith', - /// 'EndsWith', 'NotEndsWith' - /// The values to use for evaluating the - /// condition - public AutomationRulePropertyValuesConditionConditionProperties(string propertyName = default(string), string operatorProperty = default(string), IList propertyValues = default(IList)) - { - PropertyName = propertyName; - OperatorProperty = operatorProperty; - PropertyValues = propertyValues; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the property to evaluate. Possible values include: - /// 'IncidentTitle', 'IncidentDescription', 'IncidentSeverity', - /// 'IncidentStatus', 'IncidentTactics', - /// 'IncidentRelatedAnalyticRuleIds', 'IncidentProviderName', - /// 'AccountAadTenantId', 'AccountAadUserId', 'AccountName', - /// 'AccountNTDomain', 'AccountPUID', 'AccountSid', - /// 'AccountObjectGuid', 'AccountUPNSuffix', 'AzureResourceResourceId', - /// 'AzureResourceSubscriptionId', 'CloudApplicationAppId', - /// 'CloudApplicationAppName', 'DNSDomainName', 'FileDirectory', - /// 'FileName', 'FileHashValue', 'HostAzureID', 'HostName', - /// 'HostNetBiosName', 'HostNTDomain', 'HostOSVersion', 'IoTDeviceId', - /// 'IoTDeviceName', 'IoTDeviceType', 'IoTDeviceVendor', - /// 'IoTDeviceModel', 'IoTDeviceOperatingSystem', 'IPAddress', - /// 'MailboxDisplayName', 'MailboxPrimaryAddress', 'MailboxUPN', - /// 'MailMessageDeliveryAction', 'MailMessageDeliveryLocation', - /// 'MailMessageRecipient', 'MailMessageSenderIP', - /// 'MailMessageSubject', 'MailMessageP1Sender', 'MailMessageP2Sender', - /// 'MalwareCategory', 'MalwareName', 'ProcessCommandLine', - /// 'ProcessId', 'RegistryKey', 'RegistryValueData', 'Url' - /// - [JsonProperty(PropertyName = "propertyName")] - public string PropertyName { get; set; } - - /// - /// Gets or sets the operator to use for evaluation the condition. - /// Possible values include: 'Equals', 'NotEquals', 'Contains', - /// 'NotContains', 'StartsWith', 'NotStartsWith', 'EndsWith', - /// 'NotEndsWith' - /// - [JsonProperty(PropertyName = "operator")] - public string OperatorProperty { get; set; } - - /// - /// Gets or sets the values to use for evaluating the condition - /// - [JsonProperty(PropertyName = "propertyValues")] - public IList PropertyValues { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs index cbc27ec81a7c1..10c366a39c21d 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Linq; @@ -18,6 +19,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models /// Describes an automation rule action to run a playbook /// [Newtonsoft.Json.JsonObject("RunPlaybook")] + [Rest.Serialization.JsonTransformation] public partial class AutomationRuleRunPlaybookAction : AutomationRuleAction { /// @@ -33,14 +35,15 @@ public AutomationRuleRunPlaybookAction() /// Initializes a new instance of the AutomationRuleRunPlaybookAction /// class. /// - /// The order of execution of the automation rule - /// action - /// The configuration of the run - /// playbook automation rule action - public AutomationRuleRunPlaybookAction(int order, AutomationRuleRunPlaybookActionActionConfiguration actionConfiguration) + /// The resource id of the playbook + /// resource + /// The tenant id of the playbook + /// resource + public AutomationRuleRunPlaybookAction(int order, string logicAppResourceId = default(string), System.Guid? tenantId = default(System.Guid?)) : base(order) { - ActionConfiguration = actionConfiguration; + LogicAppResourceId = logicAppResourceId; + TenantId = tenantId; CustomInit(); } @@ -50,11 +53,16 @@ public AutomationRuleRunPlaybookAction(int order, AutomationRuleRunPlaybookActio partial void CustomInit(); /// - /// Gets or sets the configuration of the run playbook automation rule - /// action + /// Gets or sets the resource id of the playbook resource /// - [JsonProperty(PropertyName = "actionConfiguration")] - public AutomationRuleRunPlaybookActionActionConfiguration ActionConfiguration { get; set; } + [JsonProperty(PropertyName = "actionConfiguration.logicAppResourceId")] + public string LogicAppResourceId { get; set; } + + /// + /// Gets or sets the tenant id of the playbook resource + /// + [JsonProperty(PropertyName = "actionConfiguration.tenantId")] + public System.Guid? TenantId { get; set; } /// /// Validate the object. @@ -65,10 +73,6 @@ public AutomationRuleRunPlaybookAction(int order, AutomationRuleRunPlaybookActio public override void Validate() { base.Validate(); - if (ActionConfiguration == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ActionConfiguration"); - } } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionActionConfiguration.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionActionConfiguration.cs deleted file mode 100644 index 79bfc0fa2c0f1..0000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionActionConfiguration.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration of the run playbook automation rule action - /// - public partial class AutomationRuleRunPlaybookActionActionConfiguration - { - /// - /// Initializes a new instance of the - /// AutomationRuleRunPlaybookActionActionConfiguration class. - /// - public AutomationRuleRunPlaybookActionActionConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AutomationRuleRunPlaybookActionActionConfiguration class. - /// - /// The resource id of the playbook - /// resource - /// The tenant id of the playbook - /// resource - public AutomationRuleRunPlaybookActionActionConfiguration(string logicAppResourceId = default(string), string tenantId = default(string)) - { - LogicAppResourceId = logicAppResourceId; - TenantId = tenantId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the resource id of the playbook resource - /// - [JsonProperty(PropertyName = "logicAppResourceId")] - public string LogicAppResourceId { get; set; } - - /// - /// Gets or sets the tenant id of the playbook resource - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs index c668755fd2378..d45c450b5a359 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRuleTriggeringLogic.cs @@ -34,7 +34,7 @@ public AutomationRuleTriggeringLogic() /// class. /// /// Determines whether the automation rule is - /// enabled or disabled. + /// enabled or disabled /// Determines when the automation rule /// should automatically expire and be disabled. /// The conditions to evaluate to determine if @@ -62,7 +62,7 @@ static AutomationRuleTriggeringLogic() /// /// Gets or sets determines whether the automation rule is enabled or - /// disabled. + /// disabled /// [JsonProperty(PropertyName = "isEnabled")] public bool IsEnabled { get; set; } @@ -82,13 +82,11 @@ static AutomationRuleTriggeringLogic() public IList Conditions { get; set; } /// - /// The type of object the automation rule triggers on /// [JsonProperty(PropertyName = "triggersOn")] public static string TriggersOn { get; private set; } /// - /// The type of event the automation rule triggers on /// [JsonProperty(PropertyName = "triggersWhen")] public static string TriggersWhen { get; private set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs new file mode 100644 index 0000000000000..c85fc4c77271d --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resources created in Azure DevOps repository. + /// + public partial class AzureDevOpsResourceInfo + { + /// + /// Initializes a new instance of the AzureDevOpsResourceInfo class. + /// + public AzureDevOpsResourceInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDevOpsResourceInfo class. + /// + /// Id of the pipeline created for the + /// source-control. + /// Id of the service-connection + /// created for the source-control. + public AzureDevOpsResourceInfo(string pipelineId = default(string), string serviceConnectionId = default(string)) + { + PipelineId = pipelineId; + ServiceConnectionId = serviceConnectionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets id of the pipeline created for the source-control. + /// + [JsonProperty(PropertyName = "pipelineId")] + public string PipelineId { get; set; } + + /// + /// Gets or sets id of the service-connection created for the + /// source-control. + /// + [JsonProperty(PropertyName = "serviceConnectionId")] + public string ServiceConnectionId { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs index 8b2f0342eb465..aae6c9867326a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Bookmark.cs @@ -61,7 +61,12 @@ public Bookmark() /// The end time for the query /// Describes an incident that relates to /// bookmark - public Bookmark(string displayName, string query, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? created = default(System.DateTime?), UserInfo createdBy = default(UserInfo), IList labels = default(IList), string notes = default(string), string queryResult = default(string), System.DateTime? updated = default(System.DateTime?), UserInfo updatedBy = default(UserInfo), System.DateTime? eventTime = default(System.DateTime?), System.DateTime? queryStartTime = default(System.DateTime?), System.DateTime? queryEndTime = default(System.DateTime?), IncidentInfo incidentInfo = default(IncidentInfo)) + /// Describes the entity mappings of the + /// bookmark + /// A list of relevant mitre attacks + /// A list of relevant mitre + /// techniques + public Bookmark(string displayName, string query, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), System.DateTime? created = default(System.DateTime?), UserInfo createdBy = default(UserInfo), IList labels = default(IList), string notes = default(string), string queryResult = default(string), System.DateTime? updated = default(System.DateTime?), UserInfo updatedBy = default(UserInfo), System.DateTime? eventTime = default(System.DateTime?), System.DateTime? queryStartTime = default(System.DateTime?), System.DateTime? queryEndTime = default(System.DateTime?), IncidentInfo incidentInfo = default(IncidentInfo), IList entityMappings = default(IList), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData, etag) { Created = created; @@ -77,6 +82,9 @@ public Bookmark() QueryStartTime = queryStartTime; QueryEndTime = queryEndTime; IncidentInfo = incidentInfo; + EntityMappings = entityMappings; + Tactics = tactics; + Techniques = techniques; CustomInit(); } @@ -163,6 +171,24 @@ public Bookmark() [JsonProperty(PropertyName = "properties.incidentInfo")] public IncidentInfo IncidentInfo { get; set; } + /// + /// Gets or sets describes the entity mappings of the bookmark + /// + [JsonProperty(PropertyName = "properties.entityMappings")] + public IList EntityMappings { get; set; } + + /// + /// Gets or sets a list of relevant mitre attacks + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets a list of relevant mitre techniques + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs new file mode 100644 index 0000000000000..c07aaa2b89443 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Describes the entity mappings of a single entity + /// + public partial class BookmarkEntityMappings + { + /// + /// Initializes a new instance of the BookmarkEntityMappings class. + /// + public BookmarkEntityMappings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BookmarkEntityMappings class. + /// + /// The entity type + /// Array of fields mapping for that entity + /// type + public BookmarkEntityMappings(string entityType = default(string), IList fieldMappings = default(IList)) + { + EntityType = entityType; + FieldMappings = fieldMappings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the entity type + /// + [JsonProperty(PropertyName = "entityType")] + public string EntityType { get; set; } + + /// + /// Gets or sets array of fields mapping for that entity type + /// + [JsonProperty(PropertyName = "fieldMappings")] + public IList FieldMappings { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs new file mode 100644 index 0000000000000..48cf53f0bb526 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ConditionType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for ConditionType. + /// + public static class ConditionType + { + /// + /// Evaluate an object property value + /// + public const string Property = "Property"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs index ef6b891acd5dd..bb1716914c74a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DataConnectorKind.cs @@ -24,6 +24,8 @@ public static class DataConnectorKind public const string Office365 = "Office365"; public const string OfficeATP = "OfficeATP"; public const string OfficeIRM = "OfficeIRM"; + public const string Office365Project = "Office365Project"; + public const string OfficePowerBI = "OfficePowerBI"; public const string AmazonWebServicesCloudTrail = "AmazonWebServicesCloudTrail"; public const string AmazonWebServicesS3 = "AmazonWebServicesS3"; public const string AzureAdvancedThreatProtection = "AzureAdvancedThreatProtection"; diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs new file mode 100644 index 0000000000000..a01c72b9585f8 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Deployment.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Description about a deployment. + /// + public partial class Deployment + { + /// + /// Initializes a new instance of the Deployment class. + /// + public Deployment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Deployment class. + /// + /// Deployment identifier. + /// Current status of the deployment. + /// Possible values include: 'In_Progress', 'Completed', 'Queued', + /// 'Canceling' + /// The outcome of the deployment. + /// Possible values include: 'Success', 'Canceled', 'Failed' + /// The time when the deployment + /// finished. + /// Url to access repository action + /// logs. + public Deployment(string deploymentId = default(string), string deploymentState = default(string), string deploymentResult = default(string), System.DateTime? deploymentTime = default(System.DateTime?), string deploymentLogsUrl = default(string)) + { + DeploymentId = deploymentId; + DeploymentState = deploymentState; + DeploymentResult = deploymentResult; + DeploymentTime = deploymentTime; + DeploymentLogsUrl = deploymentLogsUrl; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets deployment identifier. + /// + [JsonProperty(PropertyName = "deploymentId")] + public string DeploymentId { get; set; } + + /// + /// Gets or sets current status of the deployment. Possible values + /// include: 'In_Progress', 'Completed', 'Queued', 'Canceling' + /// + [JsonProperty(PropertyName = "deploymentState")] + public string DeploymentState { get; set; } + + /// + /// Gets or sets the outcome of the deployment. Possible values + /// include: 'Success', 'Canceled', 'Failed' + /// + [JsonProperty(PropertyName = "deploymentResult")] + public string DeploymentResult { get; set; } + + /// + /// Gets or sets the time when the deployment finished. + /// + [JsonProperty(PropertyName = "deploymentTime")] + public System.DateTime? DeploymentTime { get; set; } + + /// + /// Gets or sets url to access repository action logs. + /// + [JsonProperty(PropertyName = "deploymentLogsUrl")] + public string DeploymentLogsUrl { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs new file mode 100644 index 0000000000000..53aa96e59130a --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentFetchStatus.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for DeploymentFetchStatus. + /// + public static class DeploymentFetchStatus + { + public const string Success = "Success"; + public const string Unauthorized = "Unauthorized"; + public const string NotFound = "NotFound"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs new file mode 100644 index 0000000000000..aa8fdee357285 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentInfo.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Information regarding a deployment. + /// + public partial class DeploymentInfo + { + /// + /// Initializes a new instance of the DeploymentInfo class. + /// + public DeploymentInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeploymentInfo class. + /// + /// Status while fetching the last + /// deployment. Possible values include: 'Success', 'Unauthorized', + /// 'NotFound' + /// Deployment information. + /// Additional details about the deployment that + /// can be shown to the user. + public DeploymentInfo(string deploymentFetchStatus = default(string), Deployment deployment = default(Deployment), string message = default(string)) + { + DeploymentFetchStatus = deploymentFetchStatus; + Deployment = deployment; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets status while fetching the last deployment. Possible + /// values include: 'Success', 'Unauthorized', 'NotFound' + /// + [JsonProperty(PropertyName = "deploymentFetchStatus")] + public string DeploymentFetchStatus { get; set; } + + /// + /// Gets or sets deployment information. + /// + [JsonProperty(PropertyName = "deployment")] + public Deployment Deployment { get; set; } + + /// + /// Gets or sets additional details about the deployment that can be + /// shown to the user. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs new file mode 100644 index 0000000000000..9e44cbf65b6f5 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentResult.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for DeploymentResult. + /// + public static class DeploymentResult + { + public const string Success = "Success"; + public const string Canceled = "Canceled"; + public const string Failed = "Failed"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs new file mode 100644 index 0000000000000..bbefb06b6e3f6 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/DeploymentState.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for DeploymentState. + /// + public static class DeploymentState + { + public const string InProgress = "In_Progress"; + public const string Completed = "Completed"; + public const string Queued = "Queued"; + public const string Canceling = "Canceling"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs similarity index 53% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorAdditionalInfo.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs index 9b6b4d01971ab..5b90d0af715d3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorAdditionalInfo.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/EntityFieldMapping.cs @@ -14,27 +14,27 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// The resource management error additional info. + /// Map identifiers of a single entity /// - public partial class ErrorAdditionalInfo + public partial class EntityFieldMapping { /// - /// Initializes a new instance of the ErrorAdditionalInfo class. + /// Initializes a new instance of the EntityFieldMapping class. /// - public ErrorAdditionalInfo() + public EntityFieldMapping() { CustomInit(); } /// - /// Initializes a new instance of the ErrorAdditionalInfo class. + /// Initializes a new instance of the EntityFieldMapping class. /// - /// The additional info type. - /// The additional info. - public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + /// Alert V3 identifier + /// The value of the identifier + public EntityFieldMapping(string identifier = default(string), string value = default(string)) { - Type = type; - Info = info; + Identifier = identifier; + Value = value; CustomInit(); } @@ -44,16 +44,16 @@ public ErrorAdditionalInfo() partial void CustomInit(); /// - /// Gets the additional info type. + /// Gets or sets alert V3 identifier /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } /// - /// Gets the additional info. + /// Gets or sets the value of the identifier /// - [JsonProperty(PropertyName = "info")] - public object Info { get; private set; } + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorDetail.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorDetail.cs deleted file mode 100644 index f100dc6720818..0000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorDetail.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The error detail. - /// - public partial class ErrorDetail - { - /// - /// Initializes a new instance of the ErrorDetail class. - /// - public ErrorDetail() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ErrorDetail class. - /// - /// The error code. - /// The error message. - /// The error target. - /// The error details. - /// The error additional info. - public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) - { - Code = code; - Message = message; - Target = target; - Details = details; - AdditionalInfo = additionalInfo; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the error code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } - - /// - /// Gets the error message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets the error target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - - /// - /// Gets the error details. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } - - /// - /// Gets the error additional info. - /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } - - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorResponseException.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorResponseException.cs deleted file mode 100644 index 93959aa48c537..0000000000000 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorResponseException.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.SecurityInsights.Models -{ - using Microsoft.Rest; - - /// - /// Exception thrown for an invalid response with ErrorResponse - /// information. - /// - public partial class ErrorResponseException : RestException - { - /// - /// Gets information about the associated HTTP request. - /// - public HttpRequestMessageWrapper Request { get; set; } - - /// - /// Gets information about the associated HTTP response. - /// - public HttpResponseMessageWrapper Response { get; set; } - - /// - /// Gets or sets the body object. - /// - public ErrorResponse Body { get; set; } - - /// - /// Initializes a new instance of the ErrorResponseException class. - /// - public ErrorResponseException() - { - } - - /// - /// Initializes a new instance of the ErrorResponseException class. - /// - /// The exception message. - public ErrorResponseException(string message) - : this(message, null) - { - } - - /// - /// Initializes a new instance of the ErrorResponseException class. - /// - /// The exception message. - /// Inner exception. - public ErrorResponseException(string message, System.Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs index b50d56ed8f5cf..25103013ad0b1 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRule.cs @@ -39,6 +39,8 @@ public FusionAlertRule() /// template used to create this rule. /// Determines whether this alert rule is enabled /// or disabled. + /// Configuration for all supported source + /// signals in fusion detection. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -52,22 +54,28 @@ public FusionAlertRule() /// rule. /// The display name for alerts created by /// this alert rule. + /// Configuration to exclude + /// scenarios in fusion detection. /// The last time that this alert has /// been modified. /// The severity for alerts created by this /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' /// The tactics of the alert rule - public FusionAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList)) + /// The techniques of the alert rule + public FusionAlertRule(string alertRuleTemplateName, bool enabled, IList sourceSettings, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), IList scenarioExclusionPatterns = default(IList), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData, etag) { AlertRuleTemplateName = alertRuleTemplateName; Description = description; DisplayName = displayName; Enabled = enabled; + SourceSettings = sourceSettings; + ScenarioExclusionPatterns = scenarioExclusionPatterns; LastModifiedUtc = lastModifiedUtc; Severity = severity; Tactics = tactics; + Techniques = techniques; CustomInit(); } @@ -102,6 +110,20 @@ public FusionAlertRule() [JsonProperty(PropertyName = "properties.enabled")] public bool Enabled { get; set; } + /// + /// Gets or sets configuration for all supported source signals in + /// fusion detection. + /// + [JsonProperty(PropertyName = "properties.sourceSettings")] + public IList SourceSettings { get; set; } + + /// + /// Gets or sets configuration to exclude scenarios in fusion + /// detection. + /// + [JsonProperty(PropertyName = "properties.scenarioExclusionPatterns")] + public IList ScenarioExclusionPatterns { get; set; } + /// /// Gets the last time that this alert has been modified. /// @@ -121,6 +143,12 @@ public FusionAlertRule() [JsonProperty(PropertyName = "properties.tactics")] public IList Tactics { get; private set; } + /// + /// Gets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; private set; } + /// /// Validate the object. /// @@ -133,6 +161,30 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "AlertRuleTemplateName"); } + if (SourceSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceSettings"); + } + if (SourceSettings != null) + { + foreach (var element in SourceSettings) + { + if (element != null) + { + element.Validate(); + } + } + } + if (ScenarioExclusionPatterns != null) + { + foreach (var element1 in ScenarioExclusionPatterns) + { + if (element1 != null) + { + element1.Validate(); + } + } + } } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs index a7be9134d6303..9172b2b6c03d9 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionAlertRuleTemplate.cs @@ -38,6 +38,8 @@ public FusionAlertRuleTemplate() /// The severity for alerts created by this /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' + /// All supported source signal + /// configurations consumed in fusion detection. /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -60,9 +62,9 @@ public FusionAlertRuleTemplate() /// this template /// The alert rule template status. Possible /// values include: 'Installed', 'Available', 'NotAvailable' - /// The tactics of the alert rule - /// template - public FusionAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList)) + /// The tactics of the alert rule + /// The techniques of the alert rule + public FusionAlertRuleTemplate(string severity, IList sourceSettings, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData) { AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; @@ -72,8 +74,10 @@ public FusionAlertRuleTemplate() DisplayName = displayName; RequiredDataConnectors = requiredDataConnectors; Status = status; - Severity = severity; Tactics = tactics; + Techniques = techniques; + Severity = severity; + SourceSettings = sourceSettings; CustomInit(); } @@ -126,6 +130,18 @@ public FusionAlertRuleTemplate() [JsonProperty(PropertyName = "properties.status")] public string Status { get; set; } + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + /// /// Gets or sets the severity for alerts created by this alert rule. /// Possible values include: 'High', 'Medium', 'Low', 'Informational' @@ -134,10 +150,11 @@ public FusionAlertRuleTemplate() public string Severity { get; set; } /// - /// Gets or sets the tactics of the alert rule template + /// Gets or sets all supported source signal configurations consumed in + /// fusion detection. /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } + [JsonProperty(PropertyName = "properties.sourceSettings")] + public IList SourceSettings { get; set; } /// /// Validate the object. @@ -151,6 +168,20 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); } + if (SourceSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceSettings"); + } + if (SourceSettings != null) + { + foreach (var element in SourceSettings) + { + if (element != null) + { + element.Validate(); + } + } + } } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs new file mode 100644 index 0000000000000..25577271cd4d4 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Fusion scenario exclusion patterns in Fusion detection. + /// + public partial class FusionScenarioExclusionPattern + { + /// + /// Initializes a new instance of the FusionScenarioExclusionPattern + /// class. + /// + public FusionScenarioExclusionPattern() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionScenarioExclusionPattern + /// class. + /// + /// Scenario exclusion pattern. + /// DateTime when scenario exclusion + /// pattern is added in UTC. + public FusionScenarioExclusionPattern(string exclusionPattern, string dateAddedInUTC) + { + ExclusionPattern = exclusionPattern; + DateAddedInUTC = dateAddedInUTC; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets scenario exclusion pattern. + /// + [JsonProperty(PropertyName = "exclusionPattern")] + public string ExclusionPattern { get; set; } + + /// + /// Gets or sets dateTime when scenario exclusion pattern is added in + /// UTC. + /// + [JsonProperty(PropertyName = "dateAddedInUTC")] + public string DateAddedInUTC { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ExclusionPattern == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ExclusionPattern"); + } + if (DateAddedInUTC == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DateAddedInUTC"); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs new file mode 100644 index 0000000000000..5773c68dd3204 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSettings.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents a supported source signal configuration in Fusion detection. + /// + public partial class FusionSourceSettings + { + /// + /// Initializes a new instance of the FusionSourceSettings class. + /// + public FusionSourceSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionSourceSettings class. + /// + /// Determines whether this source signal is + /// enabled or disabled in Fusion detection. + /// Name of the Fusion source signal. Refer to + /// Fusion alert rule template for supported values. + /// Configuration for all source subtypes + /// under this source signal consumed in fusion detection. + public FusionSourceSettings(bool enabled, string sourceName, IList sourceSubTypes = default(IList)) + { + Enabled = enabled; + SourceName = sourceName; + SourceSubTypes = sourceSubTypes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets determines whether this source signal is enabled or + /// disabled in Fusion detection. + /// + [JsonProperty(PropertyName = "enabled")] + public bool Enabled { get; set; } + + /// + /// Gets or sets name of the Fusion source signal. Refer to Fusion + /// alert rule template for supported values. + /// + [JsonProperty(PropertyName = "sourceName")] + public string SourceName { get; set; } + + /// + /// Gets or sets configuration for all source subtypes under this + /// source signal consumed in fusion detection. + /// + [JsonProperty(PropertyName = "sourceSubTypes")] + public IList SourceSubTypes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceName"); + } + if (SourceSubTypes != null) + { + foreach (var element in SourceSubTypes) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs new file mode 100644 index 0000000000000..424095d51b247 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a supported source subtype configuration under a source + /// signal in Fusion detection. + /// + public partial class FusionSourceSubTypeSetting + { + /// + /// Initializes a new instance of the FusionSourceSubTypeSetting class. + /// + public FusionSourceSubTypeSetting() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionSourceSubTypeSetting class. + /// + /// Determines whether this source subtype under + /// source signal is enabled or disabled in Fusion detection. + /// The Name of the source subtype + /// under a given source signal in Fusion detection. Refer to Fusion + /// alert rule template for supported values. + /// Severity configuration for a source + /// subtype consumed in fusion detection. + /// The display name of source + /// subtype under a source signal consumed in Fusion detection. + public FusionSourceSubTypeSetting(bool enabled, string sourceSubTypeName, FusionSubTypeSeverityFilter severityFilters, string sourceSubTypeDisplayName = default(string)) + { + Enabled = enabled; + SourceSubTypeName = sourceSubTypeName; + SourceSubTypeDisplayName = sourceSubTypeDisplayName; + SeverityFilters = severityFilters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets determines whether this source subtype under source + /// signal is enabled or disabled in Fusion detection. + /// + [JsonProperty(PropertyName = "enabled")] + public bool Enabled { get; set; } + + /// + /// Gets or sets the Name of the source subtype under a given source + /// signal in Fusion detection. Refer to Fusion alert rule template for + /// supported values. + /// + [JsonProperty(PropertyName = "sourceSubTypeName")] + public string SourceSubTypeName { get; set; } + + /// + /// Gets the display name of source subtype under a source signal + /// consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "sourceSubTypeDisplayName")] + public string SourceSubTypeDisplayName { get; private set; } + + /// + /// Gets or sets severity configuration for a source subtype consumed + /// in fusion detection. + /// + [JsonProperty(PropertyName = "severityFilters")] + public FusionSubTypeSeverityFilter SeverityFilters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceSubTypeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceSubTypeName"); + } + if (SeverityFilters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SeverityFilters"); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs new file mode 100644 index 0000000000000..6c898eb904a39 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents severity configuration for a source subtype consumed in + /// Fusion detection. + /// + public partial class FusionSubTypeSeverityFilter + { + /// + /// Initializes a new instance of the FusionSubTypeSeverityFilter + /// class. + /// + public FusionSubTypeSeverityFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionSubTypeSeverityFilter + /// class. + /// + /// Determines whether this source subtype + /// supports severity configuration or not. + /// Individual Severity configuration settings + /// for a given source subtype consumed in Fusion detection. + public FusionSubTypeSeverityFilter(bool? isSupported = default(bool?), IList filters = default(IList)) + { + IsSupported = isSupported; + Filters = filters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets determines whether this source subtype supports severity + /// configuration or not. + /// + [JsonProperty(PropertyName = "isSupported")] + public bool? IsSupported { get; private set; } + + /// + /// Gets or sets individual Severity configuration settings for a given + /// source subtype consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "filters")] + public IList Filters { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs new file mode 100644 index 0000000000000..4446d9767954e --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Severity filter setting for a given source subtype + /// consumed in Fusion detection. + /// + public partial class FusionSubTypeSeverityFiltersItem + { + /// + /// Initializes a new instance of the FusionSubTypeSeverityFiltersItem + /// class. + /// + public FusionSubTypeSeverityFiltersItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionSubTypeSeverityFiltersItem + /// class. + /// + /// The Severity for a given source subtype + /// consumed in Fusion detection. Possible values include: 'High', + /// 'Medium', 'Low', 'Informational' + /// Determines whether this severity is enabled + /// or disabled for this source subtype consumed in Fusion + /// detection. + public FusionSubTypeSeverityFiltersItem(string severity, bool enabled) + { + Severity = severity; + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Severity for a given source subtype consumed in + /// Fusion detection. Possible values include: 'High', 'Medium', 'Low', + /// 'Informational' + /// + [JsonProperty(PropertyName = "severity")] + public string Severity { get; set; } + + /// + /// Gets or sets determines whether this severity is enabled or + /// disabled for this source subtype consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "enabled")] + public bool Enabled { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Severity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Severity"); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs new file mode 100644 index 0000000000000..259f90889f9eb --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents a source signal consumed in Fusion detection. + /// + public partial class FusionTemplateSourceSetting + { + /// + /// Initializes a new instance of the FusionTemplateSourceSetting + /// class. + /// + public FusionTemplateSourceSetting() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionTemplateSourceSetting + /// class. + /// + /// The name of a source signal consumed in + /// Fusion detection. + /// All supported source subtypes under + /// this source signal consumed in fusion detection. + public FusionTemplateSourceSetting(string sourceName, IList sourceSubTypes = default(IList)) + { + SourceName = sourceName; + SourceSubTypes = sourceSubTypes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of a source signal consumed in Fusion + /// detection. + /// + [JsonProperty(PropertyName = "sourceName")] + public string SourceName { get; set; } + + /// + /// Gets or sets all supported source subtypes under this source signal + /// consumed in fusion detection. + /// + [JsonProperty(PropertyName = "sourceSubTypes")] + public IList SourceSubTypes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceName"); + } + if (SourceSubTypes != null) + { + foreach (var element in SourceSubTypes) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs new file mode 100644 index 0000000000000..c9086349a96ae --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a source subtype under a source signal consumed in Fusion + /// detection. + /// + public partial class FusionTemplateSourceSubType + { + /// + /// Initializes a new instance of the FusionTemplateSourceSubType + /// class. + /// + public FusionTemplateSourceSubType() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FusionTemplateSourceSubType + /// class. + /// + /// The name of source subtype under a + /// source signal consumed in Fusion detection. + /// Severity configuration available for a + /// source subtype consumed in fusion detection. + /// The display name of source + /// subtype under a source signal consumed in Fusion detection. + public FusionTemplateSourceSubType(string sourceSubTypeName, FusionTemplateSubTypeSeverityFilter severityFilter, string sourceSubTypeDisplayName = default(string)) + { + SourceSubTypeName = sourceSubTypeName; + SourceSubTypeDisplayName = sourceSubTypeDisplayName; + SeverityFilter = severityFilter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of source subtype under a source signal + /// consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "sourceSubTypeName")] + public string SourceSubTypeName { get; set; } + + /// + /// Gets the display name of source subtype under a source signal + /// consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "sourceSubTypeDisplayName")] + public string SourceSubTypeDisplayName { get; private set; } + + /// + /// Gets or sets severity configuration available for a source subtype + /// consumed in fusion detection. + /// + [JsonProperty(PropertyName = "severityFilter")] + public FusionTemplateSubTypeSeverityFilter SeverityFilter { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceSubTypeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceSubTypeName"); + } + if (SeverityFilter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SeverityFilter"); + } + if (SeverityFilter != null) + { + SeverityFilter.Validate(); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs new file mode 100644 index 0000000000000..f9371094616c9 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents severity configurations available for a source subtype + /// consumed in Fusion detection. + /// + public partial class FusionTemplateSubTypeSeverityFilter + { + /// + /// Initializes a new instance of the + /// FusionTemplateSubTypeSeverityFilter class. + /// + public FusionTemplateSubTypeSeverityFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// FusionTemplateSubTypeSeverityFilter class. + /// + /// Determines whether severity configuration + /// is supported for this source subtype consumed in Fusion + /// detection. + /// List of all supported severities for + /// this source subtype consumed in Fusion detection. + public FusionTemplateSubTypeSeverityFilter(bool isSupported, IList severityFilters = default(IList)) + { + IsSupported = isSupported; + SeverityFilters = severityFilters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets determines whether severity configuration is supported + /// for this source subtype consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "isSupported")] + public bool IsSupported { get; set; } + + /// + /// Gets or sets list of all supported severities for this source + /// subtype consumed in Fusion detection. + /// + [JsonProperty(PropertyName = "severityFilters")] + public IList SeverityFilters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorResponse.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs similarity index 55% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorResponse.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs index 7d2ad4e463770..2b745cf302cc0 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ErrorResponse.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/GitHubResourceInfo.cs @@ -14,30 +14,26 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Error response + /// Resources created in GitHub repository. /// - /// - /// Common error response for all Azure Resource Manager APIs to return - /// error details for failed operations. (This also follows the OData error - /// response format.). - /// - public partial class ErrorResponse + public partial class GitHubResourceInfo { /// - /// Initializes a new instance of the ErrorResponse class. + /// Initializes a new instance of the GitHubResourceInfo class. /// - public ErrorResponse() + public GitHubResourceInfo() { CustomInit(); } /// - /// Initializes a new instance of the ErrorResponse class. + /// Initializes a new instance of the GitHubResourceInfo class. /// - /// The error object. - public ErrorResponse(ErrorDetail error = default(ErrorDetail)) + /// GitHub application installation + /// id. + public GitHubResourceInfo(string appInstallationId = default(string)) { - Error = error; + AppInstallationId = appInstallationId; CustomInit(); } @@ -47,10 +43,10 @@ public ErrorResponse() partial void CustomInit(); /// - /// Gets or sets the error object. + /// Gets or sets gitHub application installation id. /// - [JsonProperty(PropertyName = "error")] - public ErrorDetail Error { get; set; } + [JsonProperty(PropertyName = "appInstallationId")] + public string AppInstallationId { get; set; } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs index a3a2c58e2d4cf..de70ffe4e6e42 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentAdditionalData.cs @@ -39,14 +39,20 @@ public IncidentAdditionalData() /// incident /// List of product names of alerts in /// the incident + /// The provider incident url to the + /// incident in Microsoft 365 Defender portal /// The tactics associated with incident - public IncidentAdditionalData(int? alertsCount = default(int?), int? bookmarksCount = default(int?), int? commentsCount = default(int?), IList alertProductNames = default(IList), IList tactics = default(IList)) + /// The techniques associated with incident's + /// tactics' + public IncidentAdditionalData(int? alertsCount = default(int?), int? bookmarksCount = default(int?), int? commentsCount = default(int?), IList alertProductNames = default(IList), string providerIncidentUrl = default(string), IList tactics = default(IList), IList techniques = default(IList)) { AlertsCount = alertsCount; BookmarksCount = bookmarksCount; CommentsCount = commentsCount; AlertProductNames = alertProductNames; + ProviderIncidentUrl = providerIncidentUrl; Tactics = tactics; + Techniques = techniques; CustomInit(); } @@ -79,11 +85,24 @@ public IncidentAdditionalData() [JsonProperty(PropertyName = "alertProductNames")] public IList AlertProductNames { get; private set; } + /// + /// Gets the provider incident url to the incident in Microsoft 365 + /// Defender portal + /// + [JsonProperty(PropertyName = "providerIncidentUrl")] + public string ProviderIncidentUrl { get; private set; } + /// /// Gets the tactics associated with incident /// [JsonProperty(PropertyName = "tactics")] public IList Tactics { get; private set; } + /// + /// Gets the techniques associated with incident's tactics' + /// + [JsonProperty(PropertyName = "techniques")] + public IList Techniques { get; private set; } + } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentLabel.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentLabel.cs index 915526fa92e99..1e2a1295a3adb 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentLabel.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/IncidentLabel.cs @@ -31,8 +31,8 @@ public IncidentLabel() /// Initializes a new instance of the IncidentLabel class. /// /// The name of the label - /// The type of the label. Possible values - /// include: 'User', 'System' + /// Possible values include: 'User', + /// 'System' public IncidentLabel(string labelName, string labelType = default(string)) { LabelName = labelName; @@ -52,11 +52,10 @@ public IncidentLabel() public string LabelName { get; set; } /// - /// Gets the type of the label. Possible values include: 'User', - /// 'System' + /// Gets or sets possible values include: 'User', 'System' /// [JsonProperty(PropertyName = "labelType")] - public string LabelType { get; private set; } + public string LabelType { get; set; } /// /// Validate the object. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs index 40245664f69f4..ba7e60467b14e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Kind.cs @@ -30,5 +30,8 @@ public static class Kind public const string Watchlist = "Watchlist"; public const string WatchlistTemplate = "WatchlistTemplate"; public const string Solution = "Solution"; + public const string AzureFunction = "AzureFunction"; + public const string LogicAppsCustomConnector = "LogicAppsCustomConnector"; + public const string AutomationRule = "AutomationRule"; } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs index f4ab67d2d5a07..7f6125663aa58 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.cs @@ -60,7 +60,8 @@ public MLBehaviorAnalyticsAlertRule() /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' /// The tactics of the alert rule - public MLBehaviorAnalyticsAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList)) + /// The techniques of the alert rule + public MLBehaviorAnalyticsAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData, etag) { AlertRuleTemplateName = alertRuleTemplateName; @@ -70,6 +71,7 @@ public MLBehaviorAnalyticsAlertRule() LastModifiedUtc = lastModifiedUtc; Severity = severity; Tactics = tactics; + Techniques = techniques; CustomInit(); } @@ -123,6 +125,12 @@ public MLBehaviorAnalyticsAlertRule() [JsonProperty(PropertyName = "properties.tactics")] public IList Tactics { get; private set; } + /// + /// Gets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs index 4b9b054cff4b3..ded57cd187ef3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.cs @@ -62,9 +62,9 @@ public MLBehaviorAnalyticsAlertRuleTemplate() /// this template /// The alert rule template status. Possible /// values include: 'Installed', 'Available', 'NotAvailable' - /// The tactics of the alert rule - /// template. - public MLBehaviorAnalyticsAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList)) + /// The tactics of the alert rule + /// The techniques of the alert rule + public MLBehaviorAnalyticsAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData) { AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; @@ -74,8 +74,9 @@ public MLBehaviorAnalyticsAlertRuleTemplate() DisplayName = displayName; RequiredDataConnectors = requiredDataConnectors; Status = status; - Severity = severity; Tactics = tactics; + Techniques = techniques; + Severity = severity; CustomInit(); } @@ -128,6 +129,18 @@ public MLBehaviorAnalyticsAlertRuleTemplate() [JsonProperty(PropertyName = "properties.status")] public string Status { get; set; } + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + /// /// Gets or sets the severity for alerts created by this alert rule. /// Possible values include: 'High', 'Medium', 'Low', 'Informational' @@ -135,12 +148,6 @@ public MLBehaviorAnalyticsAlertRuleTemplate() [JsonProperty(PropertyName = "properties.severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule template. - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs new file mode 100644 index 0000000000000..c08cd2d0689a8 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.cs @@ -0,0 +1,52 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ManualTriggerRequestBody + { + /// + /// Initializes a new instance of the ManualTriggerRequestBody class. + /// + public ManualTriggerRequestBody() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManualTriggerRequestBody class. + /// + public ManualTriggerRequestBody(System.Guid? tenantId = default(System.Guid?), string logicAppsResourceId = default(string)) + { + TenantId = tenantId; + LogicAppsResourceId = logicAppsResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "tenantId")] + public System.Guid? TenantId { get; set; } + + /// + /// + [JsonProperty(PropertyName = "logicAppsResourceId")] + public string LogicAppsResourceId { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs index 6183f38a85245..98029a7ff2c04 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataDependencies.cs @@ -40,7 +40,8 @@ public MetadataDependencies() /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution' + /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', + /// 'AutomationRule' /// Version of the the content item we depend on. /// Can be blank, * or missing to indicate any version fulfills the /// dependency. If version does not match our defined numeric format @@ -79,7 +80,8 @@ public MetadataDependencies() /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution' + /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', + /// 'AutomationRule' /// [JsonProperty(PropertyName = "kind")] public string Kind { get; set; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs index a9042e7f7bc2c..6ab7523844249 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataModel.cs @@ -42,7 +42,8 @@ public MetadataModel() /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution' + /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', + /// 'AutomationRule' /// Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// The name of the resource @@ -78,7 +79,24 @@ public MetadataModel() /// item /// last publish date for the solution /// content item - public MetadataModel(string parentId, string kind, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string contentId = default(string), string version = default(string), MetadataSource source = default(MetadataSource), MetadataAuthor author = default(MetadataAuthor), MetadataSupport support = default(MetadataSupport), MetadataDependencies dependencies = default(MetadataDependencies), MetadataCategories categories = default(MetadataCategories), IList providers = default(IList), System.DateTime? firstPublishDate = default(System.DateTime?), System.DateTime? lastPublishDate = default(System.DateTime?)) + /// The custom version of the content. A + /// optional free text + /// Schema version of the content. + /// Can be used to distinguish between different flow based on the + /// schema version + /// the icon identifier. this id can later be + /// fetched from the solution template + /// the tactics the resource + /// covers + /// the techniques the resource + /// covers, these have to be aligned with the tactics being + /// used + /// preview image file names. These will be + /// taken from the solution artifacts + /// preview image file names. These + /// will be taken from the solution artifacts. used for dark theme + /// support + public MetadataModel(string parentId, string kind, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string contentId = default(string), string version = default(string), MetadataSource source = default(MetadataSource), MetadataAuthor author = default(MetadataAuthor), MetadataSupport support = default(MetadataSupport), MetadataDependencies dependencies = default(MetadataDependencies), MetadataCategories categories = default(MetadataCategories), IList providers = default(IList), System.DateTime? firstPublishDate = default(System.DateTime?), System.DateTime? lastPublishDate = default(System.DateTime?), string customVersion = default(string), string contentSchemaVersion = default(string), string icon = default(string), IList threatAnalysisTactics = default(IList), IList threatAnalysisTechniques = default(IList), IList previewImages = default(IList), IList previewImagesDark = default(IList)) : base(id, name, type, systemData, etag) { ContentId = contentId; @@ -93,6 +111,13 @@ public MetadataModel() Providers = providers; FirstPublishDate = firstPublishDate; LastPublishDate = lastPublishDate; + CustomVersion = customVersion; + ContentSchemaVersion = contentSchemaVersion; + Icon = icon; + ThreatAnalysisTactics = threatAnalysisTactics; + ThreatAnalysisTechniques = threatAnalysisTechniques; + PreviewImages = previewImages; + PreviewImagesDark = previewImagesDark; CustomInit(); } @@ -133,7 +158,8 @@ public MetadataModel() /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution' + /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', + /// 'AutomationRule' /// [JsonProperty(PropertyName = "properties.kind")] public string Kind { get; set; } @@ -194,6 +220,54 @@ public MetadataModel() [JsonProperty(PropertyName = "properties.lastPublishDate")] public System.DateTime? LastPublishDate { get; set; } + /// + /// Gets or sets the custom version of the content. A optional free + /// text + /// + [JsonProperty(PropertyName = "properties.customVersion")] + public string CustomVersion { get; set; } + + /// + /// Gets or sets schema version of the content. Can be used to + /// distinguish between different flow based on the schema version + /// + [JsonProperty(PropertyName = "properties.contentSchemaVersion")] + public string ContentSchemaVersion { get; set; } + + /// + /// Gets or sets the icon identifier. this id can later be fetched from + /// the solution template + /// + [JsonProperty(PropertyName = "properties.icon")] + public string Icon { get; set; } + + /// + /// Gets or sets the tactics the resource covers + /// + [JsonProperty(PropertyName = "properties.threatAnalysisTactics")] + public IList ThreatAnalysisTactics { get; set; } + + /// + /// Gets or sets the techniques the resource covers, these have to be + /// aligned with the tactics being used + /// + [JsonProperty(PropertyName = "properties.threatAnalysisTechniques")] + public IList ThreatAnalysisTechniques { get; set; } + + /// + /// Gets or sets preview image file names. These will be taken from the + /// solution artifacts + /// + [JsonProperty(PropertyName = "properties.previewImages")] + public IList PreviewImages { get; set; } + + /// + /// Gets or sets preview image file names. These will be taken from the + /// solution artifacts. used for dark theme support + /// + [JsonProperty(PropertyName = "properties.previewImagesDark")] + public IList PreviewImagesDark { get; set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs index adf330c9966a5..551a98ce1556c 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/MetadataPatch.cs @@ -59,7 +59,8 @@ public MetadataPatch() /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution' + /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', + /// 'AutomationRule' /// Source of the content. This is where/how it /// was created. /// The creator of the content item. @@ -78,7 +79,24 @@ public MetadataPatch() /// item /// last publish date for the solution /// content item - public MetadataPatch(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string contentId = default(string), string parentId = default(string), string version = default(string), string kind = default(string), MetadataSource source = default(MetadataSource), MetadataAuthor author = default(MetadataAuthor), MetadataSupport support = default(MetadataSupport), MetadataDependencies dependencies = default(MetadataDependencies), MetadataCategories categories = default(MetadataCategories), IList providers = default(IList), System.DateTime? firstPublishDate = default(System.DateTime?), System.DateTime? lastPublishDate = default(System.DateTime?)) + /// The custom version of the content. A + /// optional free text + /// Schema version of the content. + /// Can be used to distinguish between different flow based on the + /// schema version + /// the icon identifier. this id can later be + /// fetched from the solution template + /// the tactics the resource + /// covers + /// the techniques the resource + /// covers, these have to be aligned with the tactics being + /// used + /// preview image file names. These will be + /// taken from the solution artifacts + /// preview image file names. These + /// will be taken from the solution artifacts. used for dark theme + /// support + public MetadataPatch(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string contentId = default(string), string parentId = default(string), string version = default(string), string kind = default(string), MetadataSource source = default(MetadataSource), MetadataAuthor author = default(MetadataAuthor), MetadataSupport support = default(MetadataSupport), MetadataDependencies dependencies = default(MetadataDependencies), MetadataCategories categories = default(MetadataCategories), IList providers = default(IList), System.DateTime? firstPublishDate = default(System.DateTime?), System.DateTime? lastPublishDate = default(System.DateTime?), string customVersion = default(string), string contentSchemaVersion = default(string), string icon = default(string), IList threatAnalysisTactics = default(IList), IList threatAnalysisTechniques = default(IList), IList previewImages = default(IList), IList previewImagesDark = default(IList)) : base(id, name, type, systemData, etag) { ContentId = contentId; @@ -93,6 +111,13 @@ public MetadataPatch() Providers = providers; FirstPublishDate = firstPublishDate; LastPublishDate = lastPublishDate; + CustomVersion = customVersion; + ContentSchemaVersion = contentSchemaVersion; + Icon = icon; + ThreatAnalysisTactics = threatAnalysisTactics; + ThreatAnalysisTechniques = threatAnalysisTechniques; + PreviewImages = previewImages; + PreviewImagesDark = previewImagesDark; CustomInit(); } @@ -133,7 +158,8 @@ public MetadataPatch() /// 'WorkbookTemplate', 'Playbook', 'PlaybookTemplate', /// 'AnalyticsRuleTemplate', 'AnalyticsRule', 'HuntingQuery', /// 'InvestigationQuery', 'Parser', 'Watchlist', 'WatchlistTemplate', - /// 'Solution' + /// 'Solution', 'AzureFunction', 'LogicAppsCustomConnector', + /// 'AutomationRule' /// [JsonProperty(PropertyName = "properties.kind")] public string Kind { get; set; } @@ -194,6 +220,54 @@ public MetadataPatch() [JsonProperty(PropertyName = "properties.lastPublishDate")] public System.DateTime? LastPublishDate { get; set; } + /// + /// Gets or sets the custom version of the content. A optional free + /// text + /// + [JsonProperty(PropertyName = "properties.customVersion")] + public string CustomVersion { get; set; } + + /// + /// Gets or sets schema version of the content. Can be used to + /// distinguish between different flow based on the schema version + /// + [JsonProperty(PropertyName = "properties.contentSchemaVersion")] + public string ContentSchemaVersion { get; set; } + + /// + /// Gets or sets the icon identifier. this id can later be fetched from + /// the solution template + /// + [JsonProperty(PropertyName = "properties.icon")] + public string Icon { get; set; } + + /// + /// Gets or sets the tactics the resource covers + /// + [JsonProperty(PropertyName = "properties.threatAnalysisTactics")] + public IList ThreatAnalysisTactics { get; set; } + + /// + /// Gets or sets the techniques the resource covers, these have to be + /// aligned with the tactics being used + /// + [JsonProperty(PropertyName = "properties.threatAnalysisTechniques")] + public IList ThreatAnalysisTechniques { get; set; } + + /// + /// Gets or sets preview image file names. These will be taken from the + /// solution artifacts + /// + [JsonProperty(PropertyName = "properties.previewImages")] + public IList PreviewImages { get; set; } + + /// + /// Gets or sets preview image file names. These will be taken from the + /// solution artifacts. used for dark theme support + /// + [JsonProperty(PropertyName = "properties.previewImagesDark")] + public IList PreviewImagesDark { get; set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs index 5779fd535d2fe..d4e7bba41531e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRule.cs @@ -62,12 +62,13 @@ public NrtAlertRule() /// rule. /// The query that creates alerts for this /// rule. + /// The tactics of the alert rule + /// The techniques of the alert rule /// The last time that this alert rule /// has been modified. /// The severity for alerts created by this /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' - /// The tactics of the alert rule /// The settings of the incidents /// that created from alerts triggered by this analytics rule /// Dictionary of string key-value pairs of @@ -76,20 +77,21 @@ public NrtAlertRule() /// alert rule /// The alert details override /// settings - public NrtAlertRule(string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), string query = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) + public NrtAlertRule(string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), string query = default(string), IList tactics = default(IList), IList techniques = default(IList), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) : base(id, name, type, systemData, etag) { AlertRuleTemplateName = alertRuleTemplateName; TemplateVersion = templateVersion; Description = description; Query = query; + Tactics = tactics; + Techniques = techniques; DisplayName = displayName; Enabled = enabled; LastModifiedUtc = lastModifiedUtc; SuppressionDuration = suppressionDuration; SuppressionEnabled = suppressionEnabled; Severity = severity; - Tactics = tactics; IncidentConfiguration = incidentConfiguration; CustomDetails = customDetails; EntityMappings = entityMappings; @@ -129,6 +131,18 @@ public NrtAlertRule() [JsonProperty(PropertyName = "properties.query")] public string Query { get; set; } + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + /// /// Gets or sets the display name for alerts created by this alert /// rule. @@ -170,12 +184,6 @@ public NrtAlertRule() [JsonProperty(PropertyName = "properties.severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - /// /// Gets or sets the settings of the incidents that created from alerts /// triggered by this analytics rule diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs index 0342a00dbbf29..f3a0902bd82f7 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.cs @@ -35,14 +35,6 @@ public NrtAlertRuleTemplate() /// /// Initializes a new instance of the NrtAlertRuleTemplate class. /// - /// the number of alert - /// rules that were created by this template - /// The description of the alert rule - /// template. - /// The display name for alert rule - /// template. - /// The alert rule template status. Possible - /// values include: 'Installed', 'Available', 'NotAvailable' /// The query that creates alerts for this /// rule. /// The severity for alerts created by this @@ -59,32 +51,21 @@ public NrtAlertRuleTemplate() /// "Microsoft.Storage/storageAccounts" /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. - /// The last time that this alert rule - /// template has been updated. - /// The time that this alert rule template - /// has been added. - /// The required data sources for - /// this template /// The tactics of the alert rule + /// The techniques of the alert rule /// Dictionary of string key-value pairs of /// columns to be attached to the alert /// Array of the entity mappings of the /// alert rule /// The alert details override /// settings - public NrtAlertRuleTemplate(int alertRulesCreatedByTemplateCount, string description, string displayName, string status, string query, string severity, string version, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), IList requiredDataConnectors = default(IList), IList tactics = default(IList), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) + public NrtAlertRuleTemplate(string query, string severity, string version, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IList tactics = default(IList), IList techniques = default(IList), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) : base(id, name, type, systemData) { - AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - LastUpdatedDateUTC = lastUpdatedDateUTC; - CreatedDateUTC = createdDateUTC; - Description = description; - DisplayName = displayName; - RequiredDataConnectors = requiredDataConnectors; - Status = status; + Tactics = tactics; + Techniques = techniques; Query = query; Severity = severity; - Tactics = tactics; Version = version; CustomDetails = customDetails; EntityMappings = entityMappings; @@ -98,48 +79,16 @@ public NrtAlertRuleTemplate() partial void CustomInit(); /// - /// Gets or sets the number of alert rules that were created by this - /// template - /// - [JsonProperty(PropertyName = "properties.alertRulesCreatedByTemplateCount")] - public int AlertRulesCreatedByTemplateCount { get; set; } - - /// - /// Gets the last time that this alert rule template has been updated. - /// - [JsonProperty(PropertyName = "properties.lastUpdatedDateUTC")] - public System.DateTime? LastUpdatedDateUTC { get; private set; } - - /// - /// Gets the time that this alert rule template has been added. - /// - [JsonProperty(PropertyName = "properties.createdDateUTC")] - public System.DateTime? CreatedDateUTC { get; private set; } - - /// - /// Gets or sets the description of the alert rule template. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the display name for alert rule template. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the required data sources for this template + /// Gets or sets the tactics of the alert rule /// - [JsonProperty(PropertyName = "properties.requiredDataConnectors")] - public IList RequiredDataConnectors { get; set; } + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } /// - /// Gets or sets the alert rule template status. Possible values - /// include: 'Installed', 'Available', 'NotAvailable' + /// Gets or sets the techniques of the alert rule /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; set; } + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } /// /// Gets or sets the query that creates alerts for this rule. @@ -154,12 +103,6 @@ public NrtAlertRuleTemplate() [JsonProperty(PropertyName = "properties.severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - /// /// Gets or sets the version of this template - in format /// &lt;a.b.c&gt;, where all are numbers. For example @@ -195,18 +138,6 @@ public NrtAlertRuleTemplate() /// public virtual void Validate() { - if (Description == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Description"); - } - if (DisplayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); - } - if (Status == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Status"); - } if (Query == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Query"); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs new file mode 100644 index 0000000000000..3915dd2756f1a --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents Office365 Project requirements check request. + /// + [Newtonsoft.Json.JsonObject("Office365Project")] + [Rest.Serialization.JsonTransformation] + public partial class Office365ProjectCheckRequirements : DataConnectorsCheckRequirements + { + /// + /// Initializes a new instance of the Office365ProjectCheckRequirements + /// class. + /// + public Office365ProjectCheckRequirements() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Office365ProjectCheckRequirements + /// class. + /// + /// The tenant id to connect to, and get the + /// data from. + public Office365ProjectCheckRequirements(string tenantId) + { + TenantId = tenantId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the tenant id to connect to, and get the data from. + /// + [JsonProperty(PropertyName = "properties.tenantId")] + public string TenantId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs similarity index 57% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs index fdeb7deed74ce..6636275c28d8f 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypes.cs @@ -15,30 +15,27 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models using System.Linq; /// - /// Describes an automation rule condition that evaluates a property's - /// value + /// The available data types for Office Microsoft Project data connector. /// - [Newtonsoft.Json.JsonObject("Property")] - public partial class AutomationRulePropertyValuesCondition : AutomationRuleCondition + public partial class Office365ProjectConnectorDataTypes { /// /// Initializes a new instance of the - /// AutomationRulePropertyValuesCondition class. + /// Office365ProjectConnectorDataTypes class. /// - public AutomationRulePropertyValuesCondition() + public Office365ProjectConnectorDataTypes() { CustomInit(); } /// /// Initializes a new instance of the - /// AutomationRulePropertyValuesCondition class. + /// Office365ProjectConnectorDataTypes class. /// - /// The configuration of the - /// automation rule condition - public AutomationRulePropertyValuesCondition(AutomationRulePropertyValuesConditionConditionProperties conditionProperties) + /// Logs data type. + public Office365ProjectConnectorDataTypes(Office365ProjectConnectorDataTypesLogs logs) { - ConditionProperties = conditionProperties; + Logs = logs; CustomInit(); } @@ -48,10 +45,10 @@ public AutomationRulePropertyValuesCondition(AutomationRulePropertyValuesConditi partial void CustomInit(); /// - /// Gets or sets the configuration of the automation rule condition + /// Gets or sets logs data type. /// - [JsonProperty(PropertyName = "conditionProperties")] - public AutomationRulePropertyValuesConditionConditionProperties ConditionProperties { get; set; } + [JsonProperty(PropertyName = "logs")] + public Office365ProjectConnectorDataTypesLogs Logs { get; set; } /// /// Validate the object. @@ -61,9 +58,13 @@ public AutomationRulePropertyValuesCondition(AutomationRulePropertyValuesConditi /// public virtual void Validate() { - if (ConditionProperties == null) + if (Logs == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ConditionProperties"); + throw new ValidationException(ValidationRules.CannotBeNull, "Logs"); + } + if (Logs != null) + { + Logs.Validate(); } } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs new file mode 100644 index 0000000000000..7de4640182e7d --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectConnectorDataTypesLogs.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using System.Linq; + + /// + /// Logs data type. + /// + public partial class Office365ProjectConnectorDataTypesLogs : DataConnectorDataTypeCommon + { + /// + /// Initializes a new instance of the + /// Office365ProjectConnectorDataTypesLogs class. + /// + public Office365ProjectConnectorDataTypesLogs() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// Office365ProjectConnectorDataTypesLogs class. + /// + /// Describe whether this data type connection is + /// enabled or not. Possible values include: 'Enabled', + /// 'Disabled' + public Office365ProjectConnectorDataTypesLogs(string state) + : base(state) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs new file mode 100644 index 0000000000000..718a37c2f7229 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents Office Microsoft Project data connector. + /// + [Newtonsoft.Json.JsonObject("Office365Project")] + [Rest.Serialization.JsonTransformation] + public partial class Office365ProjectDataConnector : DataConnector + { + /// + /// Initializes a new instance of the Office365ProjectDataConnector + /// class. + /// + public Office365ProjectDataConnector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Office365ProjectDataConnector + /// class. + /// + /// The tenant id to connect to, and get the + /// data from. + /// The available data types for the + /// connector. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. + /// Etag of the azure resource + public Office365ProjectDataConnector(string tenantId, Office365ProjectConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) + : base(id, name, type, systemData, etag) + { + TenantId = tenantId; + DataTypes = dataTypes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the tenant id to connect to, and get the data from. + /// + [JsonProperty(PropertyName = "properties.tenantId")] + public string TenantId { get; set; } + + /// + /// Gets or sets the available data types for the connector. + /// + [JsonProperty(PropertyName = "properties.dataTypes")] + public Office365ProjectConnectorDataTypes DataTypes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); + } + if (DataTypes == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); + } + if (DataTypes != null) + { + DataTypes.Validate(); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs new file mode 100644 index 0000000000000..d114d184b785b --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents Office PowerBI requirements check request. + /// + [Newtonsoft.Json.JsonObject("OfficePowerBI")] + [Rest.Serialization.JsonTransformation] + public partial class OfficePowerBICheckRequirements : DataConnectorsCheckRequirements + { + /// + /// Initializes a new instance of the OfficePowerBICheckRequirements + /// class. + /// + public OfficePowerBICheckRequirements() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OfficePowerBICheckRequirements + /// class. + /// + /// The tenant id to connect to, and get the + /// data from. + public OfficePowerBICheckRequirements(string tenantId) + { + TenantId = tenantId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the tenant id to connect to, and get the data from. + /// + [JsonProperty(PropertyName = "properties.tenantId")] + public string TenantId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs new file mode 100644 index 0000000000000..9459f871ae4e6 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypes.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The available data types for Office Microsoft PowerBI data connector. + /// + public partial class OfficePowerBIConnectorDataTypes + { + /// + /// Initializes a new instance of the OfficePowerBIConnectorDataTypes + /// class. + /// + public OfficePowerBIConnectorDataTypes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OfficePowerBIConnectorDataTypes + /// class. + /// + /// Logs data type. + public OfficePowerBIConnectorDataTypes(OfficePowerBIConnectorDataTypesLogs logs) + { + Logs = logs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets logs data type. + /// + [JsonProperty(PropertyName = "logs")] + public OfficePowerBIConnectorDataTypesLogs Logs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Logs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Logs"); + } + if (Logs != null) + { + Logs.Validate(); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs new file mode 100644 index 0000000000000..a6a6f82690594 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIConnectorDataTypesLogs.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using System.Linq; + + /// + /// Logs data type. + /// + public partial class OfficePowerBIConnectorDataTypesLogs : DataConnectorDataTypeCommon + { + /// + /// Initializes a new instance of the + /// OfficePowerBIConnectorDataTypesLogs class. + /// + public OfficePowerBIConnectorDataTypesLogs() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// OfficePowerBIConnectorDataTypesLogs class. + /// + /// Describe whether this data type connection is + /// enabled or not. Possible values include: 'Enabled', + /// 'Disabled' + public OfficePowerBIConnectorDataTypesLogs(string state) + : base(state) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs new file mode 100644 index 0000000000000..4fbb4824af3fd --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents Office Microsoft PowerBI data connector. + /// + [Newtonsoft.Json.JsonObject("OfficePowerBI")] + [Rest.Serialization.JsonTransformation] + public partial class OfficePowerBIDataConnector : DataConnector + { + /// + /// Initializes a new instance of the OfficePowerBIDataConnector class. + /// + public OfficePowerBIDataConnector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OfficePowerBIDataConnector class. + /// + /// The tenant id to connect to, and get the + /// data from. + /// The available data types for the + /// connector. + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. + /// Etag of the azure resource + public OfficePowerBIDataConnector(string tenantId, OfficePowerBIConnectorDataTypes dataTypes, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) + : base(id, name, type, systemData, etag) + { + TenantId = tenantId; + DataTypes = dataTypes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the tenant id to connect to, and get the data from. + /// + [JsonProperty(PropertyName = "properties.tenantId")] + public string TenantId { get; set; } + + /// + /// Gets or sets the available data types for the connector. + /// + [JsonProperty(PropertyName = "properties.dataTypes")] + public OfficePowerBIConnectorDataTypes DataTypes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); + } + if (DataTypes == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataTypes"); + } + if (DataTypes != null) + { + DataTypes.Validate(); + } + } + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyConditionProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyConditionProperties.cs new file mode 100644 index 0000000000000..b8341365e895a --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/PropertyConditionProperties.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Describes an automation rule condition that evaluates a property's + /// value + /// + [Newtonsoft.Json.JsonObject("Property")] + [Rest.Serialization.JsonTransformation] + public partial class PropertyConditionProperties : AutomationRuleCondition + { + /// + /// Initializes a new instance of the PropertyConditionProperties + /// class. + /// + public PropertyConditionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PropertyConditionProperties + /// class. + /// + /// Possible values include: + /// 'IncidentTitle', 'IncidentDescription', 'IncidentSeverity', + /// 'IncidentStatus', 'IncidentRelatedAnalyticRuleIds', + /// 'IncidentTactics', 'IncidentLabel', 'IncidentProviderName', + /// 'AccountAadTenantId', 'AccountAadUserId', 'AccountName', + /// 'AccountNTDomain', 'AccountPUID', 'AccountSid', + /// 'AccountObjectGuid', 'AccountUPNSuffix', 'AlertProductNames', + /// 'AzureResourceResourceId', 'AzureResourceSubscriptionId', + /// 'CloudApplicationAppId', 'CloudApplicationAppName', + /// 'DNSDomainName', 'FileDirectory', 'FileName', 'FileHashValue', + /// 'HostAzureID', 'HostName', 'HostNetBiosName', 'HostNTDomain', + /// 'HostOSVersion', 'IoTDeviceId', 'IoTDeviceName', 'IoTDeviceType', + /// 'IoTDeviceVendor', 'IoTDeviceModel', 'IoTDeviceOperatingSystem', + /// 'IPAddress', 'MailboxDisplayName', 'MailboxPrimaryAddress', + /// 'MailboxUPN', 'MailMessageDeliveryAction', + /// 'MailMessageDeliveryLocation', 'MailMessageRecipient', + /// 'MailMessageSenderIP', 'MailMessageSubject', 'MailMessageP1Sender', + /// 'MailMessageP2Sender', 'MalwareCategory', 'MalwareName', + /// 'ProcessCommandLine', 'ProcessId', 'RegistryKey', + /// 'RegistryValueData', 'Url' + /// Possible values include: 'Equals', + /// 'NotEquals', 'Contains', 'NotContains', 'StartsWith', + /// 'NotStartsWith', 'EndsWith', 'NotEndsWith' + public PropertyConditionProperties(string propertyName = default(string), string operatorProperty = default(string), IList propertyValues = default(IList)) + { + PropertyName = propertyName; + OperatorProperty = operatorProperty; + PropertyValues = propertyValues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'IncidentTitle', + /// 'IncidentDescription', 'IncidentSeverity', 'IncidentStatus', + /// 'IncidentRelatedAnalyticRuleIds', 'IncidentTactics', + /// 'IncidentLabel', 'IncidentProviderName', 'AccountAadTenantId', + /// 'AccountAadUserId', 'AccountName', 'AccountNTDomain', + /// 'AccountPUID', 'AccountSid', 'AccountObjectGuid', + /// 'AccountUPNSuffix', 'AlertProductNames', 'AzureResourceResourceId', + /// 'AzureResourceSubscriptionId', 'CloudApplicationAppId', + /// 'CloudApplicationAppName', 'DNSDomainName', 'FileDirectory', + /// 'FileName', 'FileHashValue', 'HostAzureID', 'HostName', + /// 'HostNetBiosName', 'HostNTDomain', 'HostOSVersion', 'IoTDeviceId', + /// 'IoTDeviceName', 'IoTDeviceType', 'IoTDeviceVendor', + /// 'IoTDeviceModel', 'IoTDeviceOperatingSystem', 'IPAddress', + /// 'MailboxDisplayName', 'MailboxPrimaryAddress', 'MailboxUPN', + /// 'MailMessageDeliveryAction', 'MailMessageDeliveryLocation', + /// 'MailMessageRecipient', 'MailMessageSenderIP', + /// 'MailMessageSubject', 'MailMessageP1Sender', 'MailMessageP2Sender', + /// 'MalwareCategory', 'MalwareName', 'ProcessCommandLine', + /// 'ProcessId', 'RegistryKey', 'RegistryValueData', 'Url' + /// + [JsonProperty(PropertyName = "conditionProperties.propertyName")] + public string PropertyName { get; set; } + + /// + /// Gets or sets possible values include: 'Equals', 'NotEquals', + /// 'Contains', 'NotContains', 'StartsWith', 'NotStartsWith', + /// 'EndsWith', 'NotEndsWith' + /// + [JsonProperty(PropertyName = "conditionProperties.operator")] + public string OperatorProperty { get; set; } + + /// + /// + [JsonProperty(PropertyName = "conditionProperties.propertyValues")] + public IList PropertyValues { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleProperties.cs index 6f2009efbb73f..d6f00943e4fcf 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleProperties.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleProperties.cs @@ -52,12 +52,13 @@ public QueryBasedAlertRuleProperties() /// rule. /// The query that creates alerts for this /// rule. + /// The tactics of the alert rule + /// The techniques of the alert rule /// The last time that this alert rule /// has been modified. /// The severity for alerts created by this /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' - /// The tactics of the alert rule /// The settings of the incidents /// that created from alerts triggered by this analytics rule /// Dictionary of string key-value pairs of @@ -66,19 +67,20 @@ public QueryBasedAlertRuleProperties() /// alert rule /// The alert details override /// settings - public QueryBasedAlertRuleProperties(string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), string query = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) + public QueryBasedAlertRuleProperties(string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), string query = default(string), IList tactics = default(IList), IList techniques = default(IList), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) { AlertRuleTemplateName = alertRuleTemplateName; TemplateVersion = templateVersion; Description = description; Query = query; + Tactics = tactics; + Techniques = techniques; DisplayName = displayName; Enabled = enabled; LastModifiedUtc = lastModifiedUtc; SuppressionDuration = suppressionDuration; SuppressionEnabled = suppressionEnabled; Severity = severity; - Tactics = tactics; IncidentConfiguration = incidentConfiguration; CustomDetails = customDetails; EntityMappings = entityMappings; @@ -118,6 +120,18 @@ public QueryBasedAlertRuleProperties() [JsonProperty(PropertyName = "query")] public string Query { get; set; } + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "techniques")] + public IList Techniques { get; set; } + /// /// Gets or sets the display name for alerts created by this alert /// rule. @@ -159,12 +173,6 @@ public QueryBasedAlertRuleProperties() [JsonProperty(PropertyName = "severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "tactics")] - public IList Tactics { get; set; } - /// /// Gets or sets the settings of the incidents that created from alerts /// triggered by this analytics rule diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs index 49894eafac852..70048f67373d9 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/QueryBasedAlertRuleTemplateProperties.cs @@ -38,7 +38,6 @@ public QueryBasedAlertRuleTemplateProperties() /// The severity for alerts created by this /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' - /// The tactics of the alert rule /// The version of this template - in format /// <a.b.c>, where all are numbers. For example /// <1.0.2>. @@ -48,11 +47,10 @@ public QueryBasedAlertRuleTemplateProperties() /// alert rule /// The alert details override /// settings - public QueryBasedAlertRuleTemplateProperties(string query = default(string), string severity = default(string), IList tactics = default(IList), string version = default(string), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) + public QueryBasedAlertRuleTemplateProperties(string query = default(string), string severity = default(string), string version = default(string), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) { Query = query; Severity = severity; - Tactics = tactics; Version = version; CustomDetails = customDetails; EntityMappings = entityMappings; @@ -78,12 +76,6 @@ public QueryBasedAlertRuleTemplateProperties() [JsonProperty(PropertyName = "severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "tactics")] - public IList Tactics { get; set; } - /// /// Gets or sets the version of this template - in format /// &lt;a.b.c&gt;, where all are numbers. For example diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs new file mode 100644 index 0000000000000..a9e6b6e846c64 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resources created in user's repository for the source-control. + /// + public partial class RepositoryResourceInfo + { + /// + /// Initializes a new instance of the RepositoryResourceInfo class. + /// + public RepositoryResourceInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RepositoryResourceInfo class. + /// + /// The webhook object created for the + /// source-control. + /// Resources created in GitHub for + /// this source-control. + /// Resources created in Azure + /// DevOps for this source-control. + public RepositoryResourceInfo(Webhook webhook = default(Webhook), GitHubResourceInfo gitHubResourceInfo = default(GitHubResourceInfo), AzureDevOpsResourceInfo azureDevOpsResourceInfo = default(AzureDevOpsResourceInfo)) + { + Webhook = webhook; + GitHubResourceInfo = gitHubResourceInfo; + AzureDevOpsResourceInfo = azureDevOpsResourceInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the webhook object created for the source-control. + /// + [JsonProperty(PropertyName = "webhook")] + public Webhook Webhook { get; set; } + + /// + /// Gets or sets resources created in GitHub for this source-control. + /// + [JsonProperty(PropertyName = "gitHubResourceInfo")] + public GitHubResourceInfo GitHubResourceInfo { get; set; } + + /// + /// Gets or sets resources created in Azure DevOps for this + /// source-control. + /// + [JsonProperty(PropertyName = "azureDevOpsResourceInfo")] + public AzureDevOpsResourceInfo AzureDevOpsResourceInfo { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRule.cs index 1f01349a721e8..5281dbfd47afb 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRule.cs @@ -76,9 +76,10 @@ public ScheduledAlertRule() /// all are numbers, for example 0 <1.0.2> /// The description of the alert /// rule. + /// The tactics of the alert rule + /// The techniques of the alert rule /// The last time that this alert rule /// has been modified. - /// The tactics of the alert rule /// The settings of the incidents /// that created from alerts triggered by this analytics rule /// Dictionary of string key-value pairs of @@ -87,7 +88,7 @@ public ScheduledAlertRule() /// alert rule /// The alert details override /// settings - public ScheduledAlertRule(System.TimeSpan queryFrequency, System.TimeSpan queryPeriod, TriggerOperator triggerOperator, int triggerThreshold, string query, string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), EventGroupingSettings eventGroupingSettings = default(EventGroupingSettings), string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), IList tactics = default(IList), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) + public ScheduledAlertRule(System.TimeSpan queryFrequency, System.TimeSpan queryPeriod, TriggerOperator triggerOperator, int triggerThreshold, string query, string displayName, bool enabled, System.TimeSpan suppressionDuration, bool suppressionEnabled, string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), EventGroupingSettings eventGroupingSettings = default(EventGroupingSettings), string alertRuleTemplateName = default(string), string templateVersion = default(string), string description = default(string), IList tactics = default(IList), IList techniques = default(IList), System.DateTime? lastModifiedUtc = default(System.DateTime?), IncidentConfiguration incidentConfiguration = default(IncidentConfiguration), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride)) : base(id, name, type, systemData, etag) { QueryFrequency = queryFrequency; @@ -99,13 +100,14 @@ public ScheduledAlertRule() TemplateVersion = templateVersion; Description = description; Query = query; + Tactics = tactics; + Techniques = techniques; DisplayName = displayName; Enabled = enabled; LastModifiedUtc = lastModifiedUtc; SuppressionDuration = suppressionDuration; SuppressionEnabled = suppressionEnabled; Severity = severity; - Tactics = tactics; IncidentConfiguration = incidentConfiguration; CustomDetails = customDetails; EntityMappings = entityMappings; @@ -179,6 +181,18 @@ public ScheduledAlertRule() [JsonProperty(PropertyName = "properties.query")] public string Query { get; set; } + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + /// /// Gets or sets the display name for alerts created by this alert /// rule. @@ -220,12 +234,6 @@ public ScheduledAlertRule() [JsonProperty(PropertyName = "properties.severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - /// /// Gets or sets the settings of the incidents that created from alerts /// triggered by this analytics rule diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs index 5f92ec9eb2d1f..69989a1f57223 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.cs @@ -35,14 +35,6 @@ public ScheduledAlertRuleTemplate() /// /// Initializes a new instance of the ScheduledAlertRuleTemplate class. /// - /// the number of alert - /// rules that were created by this template - /// The description of the alert rule - /// template. - /// The display name for alert rule - /// template. - /// The alert rule template status. Possible - /// values include: 'Installed', 'Available', 'NotAvailable' /// The query that creates alerts for this /// rule. /// The severity for alerts created by this @@ -68,13 +60,8 @@ public ScheduledAlertRuleTemplate() /// "Microsoft.Storage/storageAccounts" /// Azure Resource Manager metadata containing /// createdBy and modifiedBy information. - /// The last time that this alert rule - /// template has been updated. - /// The time that this alert rule template - /// has been added. - /// The required data sources for - /// this template /// The tactics of the alert rule + /// The techniques of the alert rule /// Dictionary of string key-value pairs of /// columns to be attached to the alert /// Array of the entity mappings of the @@ -83,19 +70,13 @@ public ScheduledAlertRuleTemplate() /// settings /// The event grouping /// settings. - public ScheduledAlertRuleTemplate(int alertRulesCreatedByTemplateCount, string description, string displayName, string status, string query, string severity, string version, System.TimeSpan queryFrequency, System.TimeSpan queryPeriod, TriggerOperator triggerOperator, int triggerThreshold, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), IList requiredDataConnectors = default(IList), IList tactics = default(IList), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride), EventGroupingSettings eventGroupingSettings = default(EventGroupingSettings)) + public ScheduledAlertRuleTemplate(string query, string severity, string version, System.TimeSpan queryFrequency, System.TimeSpan queryPeriod, TriggerOperator triggerOperator, int triggerThreshold, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IList tactics = default(IList), IList techniques = default(IList), IDictionary customDetails = default(IDictionary), IList entityMappings = default(IList), AlertDetailsOverride alertDetailsOverride = default(AlertDetailsOverride), EventGroupingSettings eventGroupingSettings = default(EventGroupingSettings)) : base(id, name, type, systemData) { - AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - LastUpdatedDateUTC = lastUpdatedDateUTC; - CreatedDateUTC = createdDateUTC; - Description = description; - DisplayName = displayName; - RequiredDataConnectors = requiredDataConnectors; - Status = status; + Tactics = tactics; + Techniques = techniques; Query = query; Severity = severity; - Tactics = tactics; Version = version; CustomDetails = customDetails; EntityMappings = entityMappings; @@ -114,48 +95,16 @@ public ScheduledAlertRuleTemplate() partial void CustomInit(); /// - /// Gets or sets the number of alert rules that were created by this - /// template - /// - [JsonProperty(PropertyName = "properties.alertRulesCreatedByTemplateCount")] - public int AlertRulesCreatedByTemplateCount { get; set; } - - /// - /// Gets the last time that this alert rule template has been updated. - /// - [JsonProperty(PropertyName = "properties.lastUpdatedDateUTC")] - public System.DateTime? LastUpdatedDateUTC { get; private set; } - - /// - /// Gets the time that this alert rule template has been added. - /// - [JsonProperty(PropertyName = "properties.createdDateUTC")] - public System.DateTime? CreatedDateUTC { get; private set; } - - /// - /// Gets or sets the description of the alert rule template. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the display name for alert rule template. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets the required data sources for this template + /// Gets or sets the tactics of the alert rule /// - [JsonProperty(PropertyName = "properties.requiredDataConnectors")] - public IList RequiredDataConnectors { get; set; } + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } /// - /// Gets or sets the alert rule template status. Possible values - /// include: 'Installed', 'Available', 'NotAvailable' + /// Gets or sets the techniques of the alert rule /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; set; } + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } /// /// Gets or sets the query that creates alerts for this rule. @@ -170,12 +119,6 @@ public ScheduledAlertRuleTemplate() [JsonProperty(PropertyName = "properties.severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - /// /// Gets or sets the version of this template - in format /// &lt;a.b.c&gt;, where all are numbers. For example @@ -245,18 +188,6 @@ public ScheduledAlertRuleTemplate() /// public virtual void Validate() { - if (Description == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Description"); - } - if (DisplayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName"); - } - if (Status == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Status"); - } if (Query == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Query"); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs index cff123c279113..f8da8b2a72fae 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceControl.cs @@ -52,17 +52,26 @@ public SourceControl() /// Etag of the azure resource /// The id (a Guid) of the source /// control + /// The version number associated with the source + /// control. Possible values include: 'V1', 'V2' /// A description of the source /// control - public SourceControl(string displayName, string repoType, IList contentTypes, Repository repository, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string sourceControlId = default(string), string description = default(string)) + /// Information regarding the + /// resources created in user's repository. + /// Information regarding the latest + /// deployment for the source control. + public SourceControl(string displayName, string repoType, IList contentTypes, Repository repository, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string sourceControlId = default(string), string version = default(string), string description = default(string), RepositoryResourceInfo repositoryResourceInfo = default(RepositoryResourceInfo), DeploymentInfo lastDeploymentInfo = default(DeploymentInfo)) : base(id, name, type, systemData, etag) { SourceControlId = sourceControlId; + Version = version; DisplayName = displayName; Description = description; RepoType = repoType; ContentTypes = contentTypes; Repository = repository; + RepositoryResourceInfo = repositoryResourceInfo; + LastDeploymentInfo = lastDeploymentInfo; CustomInit(); } @@ -77,6 +86,13 @@ public SourceControl() [JsonProperty(PropertyName = "properties.id")] public string SourceControlId { get; set; } + /// + /// Gets or sets the version number associated with the source control. + /// Possible values include: 'V1', 'V2' + /// + [JsonProperty(PropertyName = "properties.version")] + public string Version { get; set; } + /// /// Gets or sets the display name of the source control /// @@ -108,6 +124,20 @@ public SourceControl() [JsonProperty(PropertyName = "properties.repository")] public Repository Repository { get; set; } + /// + /// Gets or sets information regarding the resources created in user's + /// repository. + /// + [JsonProperty(PropertyName = "properties.repositoryResourceInfo")] + public RepositoryResourceInfo RepositoryResourceInfo { get; set; } + + /// + /// Gets or sets information regarding the latest deployment for the + /// source control. + /// + [JsonProperty(PropertyName = "properties.lastDeploymentInfo")] + public DeploymentInfo LastDeploymentInfo { get; set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Source.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceType.cs similarity index 88% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Source.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceType.cs index 12261c5c8fa68..d4349b47c3cf3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Source.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/SourceType.cs @@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { /// - /// Defines values for Source. + /// Defines values for SourceType. /// - public static class Source + public static class SourceType { public const string Localfile = "Local file"; public const string Remotestorage = "Remote storage"; diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs index c78df85390b62..1dfa47dfd6812 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRule.cs @@ -60,7 +60,8 @@ public ThreatIntelligenceAlertRule() /// alert rule. Possible values include: 'High', 'Medium', 'Low', /// 'Informational' /// The tactics of the alert rule - public ThreatIntelligenceAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList)) + /// The techniques of the alert rule + public ThreatIntelligenceAlertRule(string alertRuleTemplateName, bool enabled, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string description = default(string), string displayName = default(string), System.DateTime? lastModifiedUtc = default(System.DateTime?), string severity = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData, etag) { AlertRuleTemplateName = alertRuleTemplateName; @@ -70,6 +71,7 @@ public ThreatIntelligenceAlertRule() LastModifiedUtc = lastModifiedUtc; Severity = severity; Tactics = tactics; + Techniques = techniques; CustomInit(); } @@ -123,6 +125,12 @@ public ThreatIntelligenceAlertRule() [JsonProperty(PropertyName = "properties.tactics")] public IList Tactics { get; private set; } + /// + /// Gets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs index 1f12d65eec38b..3c5469130d969 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceAlertRuleTemplate.cs @@ -62,9 +62,9 @@ public ThreatIntelligenceAlertRuleTemplate() /// this template /// The alert rule template status. Possible /// values include: 'Installed', 'Available', 'NotAvailable' - /// The tactics of the alert rule - /// template - public ThreatIntelligenceAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList)) + /// The tactics of the alert rule + /// The techniques of the alert rule + public ThreatIntelligenceAlertRuleTemplate(string severity, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), int? alertRulesCreatedByTemplateCount = default(int?), System.DateTime? lastUpdatedDateUTC = default(System.DateTime?), System.DateTime? createdDateUTC = default(System.DateTime?), string description = default(string), string displayName = default(string), IList requiredDataConnectors = default(IList), string status = default(string), IList tactics = default(IList), IList techniques = default(IList)) : base(id, name, type, systemData) { AlertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; @@ -74,8 +74,9 @@ public ThreatIntelligenceAlertRuleTemplate() DisplayName = displayName; RequiredDataConnectors = requiredDataConnectors; Status = status; - Severity = severity; Tactics = tactics; + Techniques = techniques; + Severity = severity; CustomInit(); } @@ -128,6 +129,18 @@ public ThreatIntelligenceAlertRuleTemplate() [JsonProperty(PropertyName = "properties.status")] public string Status { get; set; } + /// + /// Gets or sets the tactics of the alert rule + /// + [JsonProperty(PropertyName = "properties.tactics")] + public IList Tactics { get; set; } + + /// + /// Gets or sets the techniques of the alert rule + /// + [JsonProperty(PropertyName = "properties.techniques")] + public IList Techniques { get; set; } + /// /// Gets or sets the severity for alerts created by this alert rule. /// Possible values include: 'High', 'Medium', 'Low', 'Informational' @@ -135,12 +148,6 @@ public ThreatIntelligenceAlertRuleTemplate() [JsonProperty(PropertyName = "properties.severity")] public string Severity { get; set; } - /// - /// Gets or sets the tactics of the alert rule template - /// - [JsonProperty(PropertyName = "properties.tactics")] - public IList Tactics { get; set; } - /// /// Validate the object. /// diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceIndicatorModelForRequestBody.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceIndicatorModelForRequestBody.cs index 6fd52f049272c..395184a5cbbf1 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceIndicatorModelForRequestBody.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceIndicatorModelForRequestBody.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models /// /// Threat intelligence indicator entity used in request body. /// + [Newtonsoft.Json.JsonObject("indicator")] [Rest.Serialization.JsonTransformation] public partial class ThreatIntelligenceIndicatorModelForRequestBody : ThreatIntelligenceResourceKind { diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceInformation.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceInformation.cs index 6fbf37b57f41d..078ef8bffc0d0 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceInformation.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceInformation.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models /// /// Threat intelligence information object. /// - public partial class ThreatIntelligenceInformation : ResourceWithEtag + public partial class ThreatIntelligenceInformation { /// /// Initializes a new instance of the ThreatIntelligenceInformation diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKind.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKind.cs index 8481324af1b1d..ae6d7d78a7b7b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKind.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/ThreatIntelligenceResourceKind.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.SecurityInsights.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -27,24 +26,11 @@ public ThreatIntelligenceResourceKind() CustomInit(); } - /// - /// Static constructor for ThreatIntelligenceResourceKind class. - /// - static ThreatIntelligenceResourceKind() - { - Kind = "indicator"; - } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); - /// - /// The kind of the entity. - /// - [JsonProperty(PropertyName = "kind")] - public static string Kind { get; private set; } - } } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs new file mode 100644 index 0000000000000..ae772b63d87df --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersOn.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for TriggersOn. + /// + public static class TriggersOn + { + /// + /// Trigger on Incidents + /// + public const string Incidents = "Incidents"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs new file mode 100644 index 0000000000000..a840362759d87 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/TriggersWhen.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for TriggersWhen. + /// + public static class TriggersWhen + { + /// + /// Trigger on created objects + /// + public const string Created = "Created"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs new file mode 100644 index 0000000000000..f40ba92fcd84e --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Version.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + + /// + /// Defines values for Version. + /// + public static class Version + { + public const string V1 = "V1"; + public const string V2 = "V2"; + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs index ed5627ee61a49..a9587dbd1368b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Watchlist.cs @@ -36,8 +36,6 @@ public Watchlist() /// /// The display name of the watchlist /// The provider of the watchlist - /// The source of the watchlist. Possible values - /// include: 'Local file', 'Remote storage' /// The search key is used to optimize /// query performance when using watchlists for joins with other data. /// For example, enable a column with IP addresses to be the designated @@ -53,6 +51,10 @@ public Watchlist() /// createdBy and modifiedBy information. /// Etag of the azure resource /// The id (a Guid) of the watchlist + /// The filename of the watchlist, called + /// 'source' + /// The sourceType of the watchlist. Possible + /// values include: 'Local file', 'Remote storage' /// The time the watchlist was created /// The last time the watchlist was /// updated @@ -82,15 +84,14 @@ public Watchlist() /// New, InProgress or Complete. Pls note : When a Watchlist upload /// status is equal to InProgress, the Watchlist cannot be /// deleted - /// The number of Watchlist Items in - /// the Watchlist - public Watchlist(string displayName, string provider, string source, string itemsSearchKey, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string watchlistId = default(string), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), UserInfo createdBy = default(UserInfo), UserInfo updatedBy = default(UserInfo), string description = default(string), string watchlistType = default(string), string watchlistAlias = default(string), bool? isDeleted = default(bool?), IList labels = default(IList), System.TimeSpan? defaultDuration = default(System.TimeSpan?), string tenantId = default(string), int? numberOfLinesToSkip = default(int?), string rawContent = default(string), string contentType = default(string), string uploadStatus = default(string), int? watchlistItemsCount = default(int?)) + public Watchlist(string displayName, string provider, string itemsSearchKey, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string), string watchlistId = default(string), string source = default(string), string sourceType = default(string), System.DateTime? created = default(System.DateTime?), System.DateTime? updated = default(System.DateTime?), UserInfo createdBy = default(UserInfo), UserInfo updatedBy = default(UserInfo), string description = default(string), string watchlistType = default(string), string watchlistAlias = default(string), bool? isDeleted = default(bool?), IList labels = default(IList), System.TimeSpan? defaultDuration = default(System.TimeSpan?), string tenantId = default(string), int? numberOfLinesToSkip = default(int?), string rawContent = default(string), string contentType = default(string), string uploadStatus = default(string)) : base(id, name, type, systemData, etag) { WatchlistId = watchlistId; DisplayName = displayName; Provider = provider; Source = source; + SourceType = sourceType; Created = created; Updated = updated; CreatedBy = createdBy; @@ -107,7 +108,6 @@ public Watchlist() ItemsSearchKey = itemsSearchKey; ContentType = contentType; UploadStatus = uploadStatus; - WatchlistItemsCount = watchlistItemsCount; CustomInit(); } @@ -135,12 +135,18 @@ public Watchlist() public string Provider { get; set; } /// - /// Gets or sets the source of the watchlist. Possible values include: - /// 'Local file', 'Remote storage' + /// Gets or sets the filename of the watchlist, called 'source' /// [JsonProperty(PropertyName = "properties.source")] public string Source { get; set; } + /// + /// Gets or sets the sourceType of the watchlist. Possible values + /// include: 'Local file', 'Remote storage' + /// + [JsonProperty(PropertyName = "properties.sourceType")] + public string SourceType { get; set; } + /// /// Gets or sets the time the watchlist was created /// @@ -249,12 +255,6 @@ public Watchlist() [JsonProperty(PropertyName = "properties.uploadStatus")] public string UploadStatus { get; set; } - /// - /// Gets or sets the number of Watchlist Items in the Watchlist - /// - [JsonProperty(PropertyName = "properties.watchlistItemsCount")] - public int? WatchlistItemsCount { get; set; } - /// /// Validate the object. /// @@ -271,10 +271,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Provider"); } - if (Source == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Source"); - } if (ItemsSearchKey == null) { throw new ValidationException(ValidationRules.CannotBeNull, "ItemsSearchKey"); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs new file mode 100644 index 0000000000000..2957b09663162 --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsCreateOrUpdateHeaders.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for CreateOrUpdate operation. + /// + public partial class WatchlistsCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the WatchlistsCreateOrUpdateHeaders + /// class. + /// + public WatchlistsCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WatchlistsCreateOrUpdateHeaders + /// class. + /// + /// Contains the status URL on which + /// clients are expected to poll the status of the operation. + public WatchlistsCreateOrUpdateHeaders(string azureAsyncOperation = default(string)) + { + AzureAsyncOperation = azureAsyncOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets contains the status URL on which clients are expected + /// to poll the status of the operation. + /// + [JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs new file mode 100644 index 0000000000000..6de85fb5416ec --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/WatchlistsDeleteHeaders.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Delete operation. + /// + public partial class WatchlistsDeleteHeaders + { + /// + /// Initializes a new instance of the WatchlistsDeleteHeaders class. + /// + public WatchlistsDeleteHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WatchlistsDeleteHeaders class. + /// + /// Contains the status URL on which + /// clients are expected to poll the status of the delete + /// operation. + public WatchlistsDeleteHeaders(string azureAsyncOperation = default(string)) + { + AzureAsyncOperation = azureAsyncOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets contains the status URL on which clients are expected + /// to poll the status of the delete operation. + /// + [JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs new file mode 100644 index 0000000000000..f76018a4cce5d --- /dev/null +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Models/Webhook.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.SecurityInsights.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Detail about the webhook object. + /// + public partial class Webhook + { + /// + /// Initializes a new instance of the Webhook class. + /// + public Webhook() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Webhook class. + /// + /// Unique identifier for the webhook. + /// URL that gets invoked by the + /// webhook. + /// Time when the webhook secret + /// was updated. + /// A flag to instruct the backend + /// service to rotate webhook secret. + public Webhook(string webhookId = default(string), string webhookUrl = default(string), string webhookSecretUpdateTime = default(string), bool? rotateWebhookSecret = default(bool?)) + { + WebhookId = webhookId; + WebhookUrl = webhookUrl; + WebhookSecretUpdateTime = webhookSecretUpdateTime; + RotateWebhookSecret = rotateWebhookSecret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unique identifier for the webhook. + /// + [JsonProperty(PropertyName = "webhookId")] + public string WebhookId { get; set; } + + /// + /// Gets or sets URL that gets invoked by the webhook. + /// + [JsonProperty(PropertyName = "webhookUrl")] + public string WebhookUrl { get; set; } + + /// + /// Gets or sets time when the webhook secret was updated. + /// + [JsonProperty(PropertyName = "webhookSecretUpdateTime")] + public string WebhookSecretUpdateTime { get; set; } + + /// + /// Gets or sets a flag to instruct the backend service to rotate + /// webhook secret. + /// + [JsonProperty(PropertyName = "rotateWebhookSecret")] + public bool? RotateWebhookSecret { get; set; } + + } +} diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs index 0c82ac338ab28..5300acb5198b3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/OfficeConsentsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// OfficeConsentsOperations operations. /// - internal partial class OfficeConsentsOperations : IServiceOperations, IOfficeConsentsOperations + internal partial class OfficeConsentsOperations : IServiceOperations, IOfficeConsentsOperations { /// /// Initializes a new instance of the OfficeConsentsOperations class. @@ -36,7 +36,7 @@ internal partial class OfficeConsentsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal OfficeConsentsOperations(SecurityInsightsClient client) + internal OfficeConsentsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal OfficeConsentsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all office365 consents. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Operations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Operations.cs index 817cb31f1651c..13edbb9da26f3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Operations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/Operations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// Operations operations. /// - internal partial class Operations : IServiceOperations, IOperations + internal partial class Operations : IServiceOperations, IOperations { /// /// Initializes a new instance of the Operations class. @@ -36,7 +36,7 @@ internal partial class Operations : IServiceOperations, /// /// Thrown when a required parameter is null /// - internal Operations(SecurityInsightsClient client) + internal Operations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal Operations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Lists all operations available Azure Security Insights Resource Provider. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs index 17cab90b475e1..acdfcbab4ada3 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ProductSettingsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// ProductSettingsOperations operations. /// - internal partial class ProductSettingsOperations : IServiceOperations, IProductSettingsOperations + internal partial class ProductSettingsOperations : IServiceOperations, IProductSettingsOperations { /// /// Initializes a new instance of the ProductSettingsOperations class. @@ -36,7 +36,7 @@ internal partial class ProductSettingsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProductSettingsOperations(SecurityInsightsClient client) + internal ProductSettingsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal ProductSettingsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// List of all the settings diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs index 761fa1fa8e3af..ec071544182d8 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SdkInfo_SecurityInsights.cs @@ -19,52 +19,40 @@ public static IEnumerable> ApiInfo_SecurityInsight { return new Tuple[] { - new Tuple("OperationalInsights", "Actions", "2021-09-01-preview"), - new Tuple("OperationalInsights", "AlertRuleTemplates", "2021-09-01-preview"), - new Tuple("OperationalInsights", "AlertRules", "2021-09-01-preview"), - new Tuple("OperationalInsights", "AutomationRules", "2021-09-01-preview"), - new Tuple("OperationalInsights", "Bookmark", "2021-09-01-preview"), - new Tuple("OperationalInsights", "BookmarkRelations", "2021-09-01-preview"), - new Tuple("OperationalInsights", "Bookmarks", "2021-09-01-preview"), - new Tuple("OperationalInsights", "DataConnectors", "2021-09-01-preview"), - new Tuple("OperationalInsights", "DataConnectorsCheckRequirements", "2021-09-01-preview"), - new Tuple("OperationalInsights", "Entities", "2021-09-01-preview"), - new Tuple("OperationalInsights", "EntitiesGetTimeline", "2021-09-01-preview"), - new Tuple("OperationalInsights", "EntitiesRelations", "2021-09-01-preview"), - new Tuple("OperationalInsights", "EntityQueries", "2021-09-01-preview"), - new Tuple("OperationalInsights", "EntityQueryTemplates", "2021-09-01-preview"), - new Tuple("OperationalInsights", "EntityRelations", "2021-09-01-preview"), - new Tuple("OperationalInsights", "IncidentComments", "2021-09-01-preview"), - new Tuple("OperationalInsights", "IncidentRelations", "2021-09-01-preview"), - new Tuple("OperationalInsights", "Incidents", "2021-09-01-preview"), - new Tuple("OperationalInsights", "Metadata", "2021-09-01-preview"), - new Tuple("OperationalInsights", "OfficeConsents", "2021-09-01-preview"), - new Tuple("OperationalInsights", "ProductSettings", "2021-09-01-preview"), - new Tuple("OperationalInsights", "SentinelOnboardingStates", "2021-09-01-preview"), - new Tuple("OperationalInsights", "SourceControl", "2021-09-01-preview"), - new Tuple("OperationalInsights", "SourceControls", "2021-09-01-preview"), - new Tuple("OperationalInsights", "ThreatIntelligenceIndicator", "2021-09-01-preview"), - new Tuple("OperationalInsights", "ThreatIntelligenceIndicatorMetrics", "2021-09-01-preview"), - new Tuple("OperationalInsights", "ThreatIntelligenceIndicators", "2021-09-01-preview"), - new Tuple("OperationalInsights", "WatchlistItems", "2021-09-01-preview"), - new Tuple("OperationalInsights", "Watchlists", "2021-09-01-preview"), - new Tuple("SecurityInsights", "DomainWhois", "2021-09-01-preview"), - new Tuple("SecurityInsights", "IPGeodata", "2021-09-01-preview"), - new Tuple("SecurityInsights", "Operations", "2021-09-01-preview"), + new Tuple("OperationalInsights", "Actions", "2022-01-01-preview"), + new Tuple("OperationalInsights", "AlertRuleTemplates", "2022-01-01-preview"), + new Tuple("OperationalInsights", "AlertRules", "2022-01-01-preview"), + new Tuple("OperationalInsights", "AutomationRules", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Bookmark", "2022-01-01-preview"), + new Tuple("OperationalInsights", "BookmarkRelations", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Bookmarks", "2022-01-01-preview"), + new Tuple("OperationalInsights", "DataConnectors", "2022-01-01-preview"), + new Tuple("OperationalInsights", "DataConnectorsCheckRequirements", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Entities", "2022-01-01-preview"), + new Tuple("OperationalInsights", "EntitiesGetTimeline", "2022-01-01-preview"), + new Tuple("OperationalInsights", "EntitiesRelations", "2022-01-01-preview"), + new Tuple("OperationalInsights", "EntityQueries", "2022-01-01-preview"), + new Tuple("OperationalInsights", "EntityQueryTemplates", "2022-01-01-preview"), + new Tuple("OperationalInsights", "EntityRelations", "2022-01-01-preview"), + new Tuple("OperationalInsights", "IncidentComments", "2022-01-01-preview"), + new Tuple("OperationalInsights", "IncidentRelations", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Incidents", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Metadata", "2022-01-01-preview"), + new Tuple("OperationalInsights", "OfficeConsents", "2022-01-01-preview"), + new Tuple("OperationalInsights", "ProductSettings", "2022-01-01-preview"), + new Tuple("OperationalInsights", "SentinelOnboardingStates", "2022-01-01-preview"), + new Tuple("OperationalInsights", "SourceControl", "2022-01-01-preview"), + new Tuple("OperationalInsights", "SourceControls", "2022-01-01-preview"), + new Tuple("OperationalInsights", "ThreatIntelligenceIndicator", "2022-01-01-preview"), + new Tuple("OperationalInsights", "ThreatIntelligenceIndicatorMetrics", "2022-01-01-preview"), + new Tuple("OperationalInsights", "ThreatIntelligenceIndicators", "2022-01-01-preview"), + new Tuple("OperationalInsights", "WatchlistItems", "2022-01-01-preview"), + new Tuple("OperationalInsights", "Watchlists", "2022-01-01-preview"), + new Tuple("SecurityInsights", "DomainWhois", "2022-01-01-preview"), + new Tuple("SecurityInsights", "IPGeodata", "2022-01-01-preview"), + new Tuple("SecurityInsights", "Operations", "2022-01-01-preview"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/securityinsights/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=E:\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "main"; - public static readonly String GithubCommidId = "f727c69fa6aa618d706adae3fe8c1222d08d7a4d"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - - diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsightsClient.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs similarity index 89% rename from sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsightsClient.cs rename to sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs index 381f9f8f6e63c..f9e4decb52bdf 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsightsClient.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SecurityInsights.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// API spec for Microsoft.SecurityInsights (Azure Security Insights) /// resource provider /// - public partial class SecurityInsightsClient : ServiceClient, ISecurityInsightsClient, IAzureClient + public partial class SecurityInsights : ServiceClient, ISecurityInsights, IAzureClient { /// /// The base URI of the service. @@ -120,11 +120,6 @@ public partial class SecurityInsightsClient : ServiceClient public virtual IDomainWhoisOperations DomainWhois { get; private set; } - /// - /// Gets the IEntityQueriesOperations. - /// - public virtual IEntityQueriesOperations EntityQueries { get; private set; } - /// /// Gets the IEntitiesOperations. /// @@ -145,6 +140,16 @@ public partial class SecurityInsightsClient : ServiceClient public virtual IEntityRelationsOperations EntityRelations { get; private set; } + /// + /// Gets the IEntityQueriesOperations. + /// + public virtual IEntityQueriesOperations EntityQueries { get; private set; } + + /// + /// Gets the IEntityQueryTemplatesOperations. + /// + public virtual IEntityQueryTemplatesOperations EntityQueryTemplates { get; private set; } + /// /// Gets the IIncidentsOperations. /// @@ -165,6 +170,11 @@ public partial class SecurityInsightsClient : ServiceClient public virtual IMetadataOperations Metadata { get; private set; } + /// + /// Gets the IOfficeConsentsOperations. + /// + public virtual IOfficeConsentsOperations OfficeConsents { get; private set; } + /// /// Gets the ISentinelOnboardingStatesOperations. /// @@ -186,39 +196,39 @@ public partial class SecurityInsightsClient : ServiceClient - /// Gets the IWatchlistsOperations. + /// Gets the IThreatIntelligenceIndicatorOperations. /// - public virtual IWatchlistsOperations Watchlists { get; private set; } + public virtual IThreatIntelligenceIndicatorOperations ThreatIntelligenceIndicator { get; private set; } /// - /// Gets the IWatchlistItemsOperations. + /// Gets the IThreatIntelligenceIndicatorsOperations. /// - public virtual IWatchlistItemsOperations WatchlistItems { get; private set; } + public virtual IThreatIntelligenceIndicatorsOperations ThreatIntelligenceIndicators { get; private set; } /// - /// Gets the IDataConnectorsOperations. + /// Gets the IThreatIntelligenceIndicatorMetricsOperations. /// - public virtual IDataConnectorsOperations DataConnectors { get; private set; } + public virtual IThreatIntelligenceIndicatorMetricsOperations ThreatIntelligenceIndicatorMetrics { get; private set; } /// - /// Gets the IDataConnectorsCheckRequirementsOperations. + /// Gets the IWatchlistsOperations. /// - public virtual IDataConnectorsCheckRequirementsOperations DataConnectorsCheckRequirements { get; private set; } + public virtual IWatchlistsOperations Watchlists { get; private set; } /// - /// Gets the IThreatIntelligenceIndicatorOperations. + /// Gets the IWatchlistItemsOperations. /// - public virtual IThreatIntelligenceIndicatorOperations ThreatIntelligenceIndicator { get; private set; } + public virtual IWatchlistItemsOperations WatchlistItems { get; private set; } /// - /// Gets the IThreatIntelligenceIndicatorsOperations. + /// Gets the IDataConnectorsOperations. /// - public virtual IThreatIntelligenceIndicatorsOperations ThreatIntelligenceIndicators { get; private set; } + public virtual IDataConnectorsOperations DataConnectors { get; private set; } /// - /// Gets the IThreatIntelligenceIndicatorMetricsOperations. + /// Gets the IDataConnectorsCheckRequirementsOperations. /// - public virtual IThreatIntelligenceIndicatorMetricsOperations ThreatIntelligenceIndicatorMetrics { get; private set; } + public virtual IDataConnectorsCheckRequirementsOperations DataConnectorsCheckRequirements { get; private set; } /// /// Gets the IOperations. @@ -226,41 +236,31 @@ public partial class SecurityInsightsClient : ServiceClient - /// Gets the IOfficeConsentsOperations. - /// - public virtual IOfficeConsentsOperations OfficeConsents { get; private set; } - - /// - /// Gets the IEntityQueryTemplatesOperations. - /// - public virtual IEntityQueryTemplatesOperations EntityQueryTemplates { get; private set; } - - /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// HttpClient to be used /// /// - /// True: will dispose the provided httpClient on calling SecurityInsightsClient.Dispose(). False: will not dispose provided httpClient - protected SecurityInsightsClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + /// True: will dispose the provided httpClient on calling SecurityInsights.Dispose(). False: will not dispose provided httpClient + protected SecurityInsights(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { Initialize(); } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SecurityInsightsClient(params DelegatingHandler[] handlers) : base(handlers) + protected SecurityInsights(params DelegatingHandler[] handlers) : base(handlers) { Initialize(); } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Optional. The http client handler used to handle http transport. @@ -268,13 +268,13 @@ protected SecurityInsightsClient(params DelegatingHandler[] handlers) : base(han /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SecurityInsightsClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected SecurityInsights(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { Initialize(); } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Optional. The base URI of the service. @@ -285,7 +285,7 @@ protected SecurityInsightsClient(HttpClientHandler rootHandler, params Delegatin /// /// Thrown when a required parameter is null /// - protected SecurityInsightsClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected SecurityInsights(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -295,7 +295,7 @@ protected SecurityInsightsClient(System.Uri baseUri, params DelegatingHandler[] } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Optional. The base URI of the service. @@ -309,7 +309,7 @@ protected SecurityInsightsClient(System.Uri baseUri, params DelegatingHandler[] /// /// Thrown when a required parameter is null /// - protected SecurityInsightsClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected SecurityInsights(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -319,7 +319,7 @@ protected SecurityInsightsClient(System.Uri baseUri, HttpClientHandler rootHandl } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Required. Credentials needed for the client to connect to Azure. @@ -330,7 +330,7 @@ protected SecurityInsightsClient(System.Uri baseUri, HttpClientHandler rootHandl /// /// Thrown when a required parameter is null /// - public SecurityInsightsClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SecurityInsights(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -344,7 +344,7 @@ public SecurityInsightsClient(ServiceClientCredentials credentials, params Deleg } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Required. Credentials needed for the client to connect to Azure. @@ -353,11 +353,11 @@ public SecurityInsightsClient(ServiceClientCredentials credentials, params Deleg /// HttpClient to be used /// /// - /// True: will dispose the provided httpClient on calling SecurityInsightsClient.Dispose(). False: will not dispose provided httpClient + /// True: will dispose the provided httpClient on calling SecurityInsights.Dispose(). False: will not dispose provided httpClient /// /// Thrown when a required parameter is null /// - public SecurityInsightsClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public SecurityInsights(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { @@ -371,7 +371,7 @@ public SecurityInsightsClient(ServiceClientCredentials credentials, HttpClient h } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Required. Credentials needed for the client to connect to Azure. @@ -385,7 +385,7 @@ public SecurityInsightsClient(ServiceClientCredentials credentials, HttpClient h /// /// Thrown when a required parameter is null /// - public SecurityInsightsClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SecurityInsights(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { @@ -399,7 +399,7 @@ public SecurityInsightsClient(ServiceClientCredentials credentials, HttpClientHa } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Optional. The base URI of the service. @@ -413,7 +413,7 @@ public SecurityInsightsClient(ServiceClientCredentials credentials, HttpClientHa /// /// Thrown when a required parameter is null /// - public SecurityInsightsClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SecurityInsights(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -432,7 +432,7 @@ public SecurityInsightsClient(System.Uri baseUri, ServiceClientCredentials crede } /// - /// Initializes a new instance of the SecurityInsightsClient class. + /// Initializes a new instance of the SecurityInsights class. /// /// /// Optional. The base URI of the service. @@ -449,7 +449,7 @@ public SecurityInsightsClient(System.Uri baseUri, ServiceClientCredentials crede /// /// Thrown when a required parameter is null /// - public SecurityInsightsClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SecurityInsights(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -485,31 +485,31 @@ private void Initialize() Bookmark = new BookmarkOperations(this); IPGeodata = new IPGeodataOperations(this); DomainWhois = new DomainWhoisOperations(this); - EntityQueries = new EntityQueriesOperations(this); Entities = new EntitiesOperations(this); EntitiesGetTimeline = new EntitiesGetTimelineOperations(this); EntitiesRelations = new EntitiesRelationsOperations(this); EntityRelations = new EntityRelationsOperations(this); + EntityQueries = new EntityQueriesOperations(this); + EntityQueryTemplates = new EntityQueryTemplatesOperations(this); Incidents = new IncidentsOperations(this); IncidentComments = new IncidentCommentsOperations(this); IncidentRelations = new IncidentRelationsOperations(this); Metadata = new MetadataOperations(this); + OfficeConsents = new OfficeConsentsOperations(this); SentinelOnboardingStates = new SentinelOnboardingStatesOperations(this); ProductSettings = new ProductSettingsOperations(this); SourceControl = new SourceControlOperations(this); SourceControls = new SourceControlsOperations(this); + ThreatIntelligenceIndicator = new ThreatIntelligenceIndicatorOperations(this); + ThreatIntelligenceIndicators = new ThreatIntelligenceIndicatorsOperations(this); + ThreatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsOperations(this); Watchlists = new WatchlistsOperations(this); WatchlistItems = new WatchlistItemsOperations(this); DataConnectors = new DataConnectorsOperations(this); DataConnectorsCheckRequirements = new DataConnectorsCheckRequirementsOperations(this); - ThreatIntelligenceIndicator = new ThreatIntelligenceIndicatorOperations(this); - ThreatIntelligenceIndicators = new ThreatIntelligenceIndicatorsOperations(this); - ThreatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsOperations(this); Operations = new Operations(this); - OfficeConsents = new OfficeConsentsOperations(this); - EntityQueryTemplates = new EntityQueryTemplatesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-09-01-preview"; + ApiVersion = "2022-01-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -549,24 +549,26 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("actionType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("kind")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SentinelOnboardingStatesOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SentinelOnboardingStatesOperations.cs index 18e1fb271655c..6d5ad39e9e510 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SentinelOnboardingStatesOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SentinelOnboardingStatesOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// SentinelOnboardingStatesOperations operations. /// - internal partial class SentinelOnboardingStatesOperations : IServiceOperations, ISentinelOnboardingStatesOperations + internal partial class SentinelOnboardingStatesOperations : IServiceOperations, ISentinelOnboardingStatesOperations { /// /// Initializes a new instance of the SentinelOnboardingStatesOperations class. @@ -36,7 +36,7 @@ internal partial class SentinelOnboardingStatesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal SentinelOnboardingStatesOperations(SecurityInsightsClient client) + internal SentinelOnboardingStatesOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal SentinelOnboardingStatesOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Get Sentinel onboarding state diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs index 52efe50962bca..940c11eb6cba4 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// SourceControlOperations operations. /// - internal partial class SourceControlOperations : IServiceOperations, ISourceControlOperations + internal partial class SourceControlOperations : IServiceOperations, ISourceControlOperations { /// /// Initializes a new instance of the SourceControlOperations class. @@ -36,7 +36,7 @@ internal partial class SourceControlOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal SourceControlOperations(SecurityInsightsClient client) + internal SourceControlOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal SourceControlOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets a list of repositories metadata. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs index 8cec74d24f476..8f6d46fb0e0a4 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/SourceControlsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// SourceControlsOperations operations. /// - internal partial class SourceControlsOperations : IServiceOperations, ISourceControlsOperations + internal partial class SourceControlsOperations : IServiceOperations, ISourceControlsOperations { /// /// Initializes a new instance of the SourceControlsOperations class. @@ -36,7 +36,7 @@ internal partial class SourceControlsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal SourceControlsOperations(SecurityInsightsClient client) + internal SourceControlsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal SourceControlsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all source controls, without source control items. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorMetricsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorMetricsOperations.cs index 4eb4dd4f4c81d..928943cb7e0e6 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorMetricsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorMetricsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// ThreatIntelligenceIndicatorMetricsOperations operations. /// - internal partial class ThreatIntelligenceIndicatorMetricsOperations : IServiceOperations, IThreatIntelligenceIndicatorMetricsOperations + internal partial class ThreatIntelligenceIndicatorMetricsOperations : IServiceOperations, IThreatIntelligenceIndicatorMetricsOperations { /// /// Initializes a new instance of the ThreatIntelligenceIndicatorMetricsOperations class. @@ -36,7 +36,7 @@ internal partial class ThreatIntelligenceIndicatorMetricsOperations : IServiceOp /// /// Thrown when a required parameter is null /// - internal ThreatIntelligenceIndicatorMetricsOperations(SecurityInsightsClient client) + internal ThreatIntelligenceIndicatorMetricsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal ThreatIntelligenceIndicatorMetricsOperations(SecurityInsightsClient cli } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Get threat intelligence indicators metrics (Indicators counts by Type, diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorOperations.cs index f3e3b0c3cf249..768cf622281c7 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// ThreatIntelligenceIndicatorOperations operations. /// - internal partial class ThreatIntelligenceIndicatorOperations : IServiceOperations, IThreatIntelligenceIndicatorOperations + internal partial class ThreatIntelligenceIndicatorOperations : IServiceOperations, IThreatIntelligenceIndicatorOperations { /// /// Initializes a new instance of the ThreatIntelligenceIndicatorOperations class. @@ -36,7 +36,7 @@ internal partial class ThreatIntelligenceIndicatorOperations : IServiceOperation /// /// Thrown when a required parameter is null /// - internal ThreatIntelligenceIndicatorOperations(SecurityInsightsClient client) + internal ThreatIntelligenceIndicatorOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal ThreatIntelligenceIndicatorOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Create a new threat intelligence indicator. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs index 19ef9d524c634..faf1dd210e16a 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/ThreatIntelligenceIndicatorsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// ThreatIntelligenceIndicatorsOperations operations. /// - internal partial class ThreatIntelligenceIndicatorsOperations : IServiceOperations, IThreatIntelligenceIndicatorsOperations + internal partial class ThreatIntelligenceIndicatorsOperations : IServiceOperations, IThreatIntelligenceIndicatorsOperations { /// /// Initializes a new instance of the ThreatIntelligenceIndicatorsOperations class. @@ -36,7 +36,7 @@ internal partial class ThreatIntelligenceIndicatorsOperations : IServiceOperatio /// /// Thrown when a required parameter is null /// - internal ThreatIntelligenceIndicatorsOperations(SecurityInsightsClient client) + internal ThreatIntelligenceIndicatorsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal ThreatIntelligenceIndicatorsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Get all threat intelligence indicators. diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs index ac6a5c2e2718d..1ccd4616a230e 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// WatchlistItemsOperations operations. /// - internal partial class WatchlistItemsOperations : IServiceOperations, IWatchlistItemsOperations + internal partial class WatchlistItemsOperations : IServiceOperations, IWatchlistItemsOperations { /// /// Initializes a new instance of the WatchlistItemsOperations class. @@ -36,7 +36,7 @@ internal partial class WatchlistItemsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal WatchlistItemsOperations(SecurityInsightsClient client) + internal WatchlistItemsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal WatchlistItemsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all watchlist Items. @@ -62,6 +62,12 @@ internal WatchlistItemsOperations(SecurityInsightsClient client) /// /// Watchlist Alias /// + /// + /// Skiptoken is only used if a previous operation returned a partial result. + /// If a previous response contains a nextLink element, the value of the + /// nextLink element will include a skiptoken parameter that specifies a + /// starting point to use for subsequent calls. Optional. + /// /// /// Headers that will be added to request. /// @@ -83,7 +89,7 @@ internal WatchlistItemsOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -150,6 +156,7 @@ internal WatchlistItemsOperations(SecurityInsightsClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("watchlistAlias", watchlistAlias); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); @@ -166,6 +173,10 @@ internal WatchlistItemsOperations(SecurityInsightsClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs index 6bee5dac343f4..ce588ad7a0af9 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistItemsOperationsExtensions.cs @@ -36,9 +36,15 @@ public static partial class WatchlistItemsOperationsExtensions /// /// Watchlist Alias /// - public static IPage List(this IWatchlistItemsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias) + /// + /// Skiptoken is only used if a previous operation returned a partial result. + /// If a previous response contains a nextLink element, the value of the + /// nextLink element will include a skiptoken parameter that specifies a + /// starting point to use for subsequent calls. Optional. + /// + public static IPage List(this IWatchlistItemsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, string skipToken = default(string)) { - return operations.ListAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult(); + return operations.ListAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken).GetAwaiter().GetResult(); } /// @@ -56,12 +62,18 @@ public static IPage List(this IWatchlistItemsOperations operation /// /// Watchlist Alias /// + /// + /// Skiptoken is only used if a previous operation returned a partial result. + /// If a previous response contains a nextLink element, the value of the + /// nextLink element will include a skiptoken parameter that specifies a + /// starting point to use for subsequent calls. Optional. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IWatchlistItemsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IWatchlistItemsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs index c550b0269f33f..dae08252ca71b 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperations.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.SecurityInsights /// /// WatchlistsOperations operations. /// - internal partial class WatchlistsOperations : IServiceOperations, IWatchlistsOperations + internal partial class WatchlistsOperations : IServiceOperations, IWatchlistsOperations { /// /// Initializes a new instance of the WatchlistsOperations class. @@ -36,7 +36,7 @@ internal partial class WatchlistsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal WatchlistsOperations(SecurityInsightsClient client) + internal WatchlistsOperations(SecurityInsights client) { if (client == null) { @@ -46,9 +46,9 @@ internal WatchlistsOperations(SecurityInsightsClient client) } /// - /// Gets a reference to the SecurityInsightsClient + /// Gets a reference to the SecurityInsights /// - public SecurityInsightsClient Client { get; private set; } + public SecurityInsights Client { get; private set; } /// /// Gets all watchlists, without watchlist items. @@ -59,6 +59,12 @@ internal WatchlistsOperations(SecurityInsightsClient client) /// /// The name of the workspace. /// + /// + /// Skiptoken is only used if a previous operation returned a partial result. + /// If a previous response contains a nextLink element, the value of the + /// nextLink element will include a skiptoken parameter that specifies a + /// starting point to use for subsequent calls. Optional. + /// /// /// Headers that will be added to request. /// @@ -80,7 +86,7 @@ internal WatchlistsOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -143,6 +149,7 @@ internal WatchlistsOperations(SecurityInsightsClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -157,6 +164,10 @@ internal WatchlistsOperations(SecurityInsightsClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } + if (skipToken != null) + { + _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -544,6 +555,9 @@ internal WatchlistsOperations(SecurityInsightsClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -553,7 +567,7 @@ internal WatchlistsOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -694,7 +708,7 @@ internal WatchlistsOperations(SecurityInsightsClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -729,13 +743,44 @@ internal WatchlistsOperations(SecurityInsightsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); @@ -744,9 +789,14 @@ internal WatchlistsOperations(SecurityInsightsClient client) } /// - /// Creates or updates a watchlist and its watchlist items (bulk creation, e.g. - /// through text/csv content type). To create a Watchlist and its items, we - /// should call this endpoint with rawContent and contentType properties. + /// Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. + /// through text/csv content type). To create a Watchlist and its Items, we + /// should call this endpoint with either rawContent or a valid SAR URI and + /// contentType properties. The rawContent is mainly used for small watchlist + /// (content size below 3.8 MB). The SAS URI enables the creation of large + /// watchlist, where the content size can go up to 500 MB. The status of + /// processing such large file can be polled through the URL returned in + /// Azure-AsyncOperation header. /// /// /// The name of the resource group. The name is case insensitive. @@ -781,7 +831,7 @@ internal WatchlistsOperations(SecurityInsightsClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -972,7 +1022,7 @@ internal WatchlistsOperations(SecurityInsightsClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1015,6 +1065,19 @@ internal WatchlistsOperations(SecurityInsightsClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); diff --git a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs index 4ccfc5966948a..73087388d1538 100644 --- a/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs +++ b/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/src/Generated/WatchlistsOperationsExtensions.cs @@ -33,9 +33,15 @@ public static partial class WatchlistsOperationsExtensions /// /// The name of the workspace. /// - public static IPage List(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName) + /// + /// Skiptoken is only used if a previous operation returned a partial result. + /// If a previous response contains a nextLink element, the value of the + /// nextLink element will include a skiptoken parameter that specifies a + /// starting point to use for subsequent calls. Optional. + /// + public static IPage List(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string skipToken = default(string)) { - return operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult(); + return operations.ListAsync(resourceGroupName, workspaceName, skipToken).GetAwaiter().GetResult(); } /// @@ -50,12 +56,18 @@ public static IPage List(this IWatchlistsOperations operations, strin /// /// The name of the workspace. /// + /// + /// Skiptoken is only used if a previous operation returned a partial result. + /// If a previous response contains a nextLink element, the value of the + /// nextLink element will include a skiptoken parameter that specifies a + /// starting point to use for subsequent calls. Optional. + /// /// /// The cancellation token. /// - public static async Task> ListAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, skipToken, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -122,9 +134,9 @@ public static Watchlist Get(this IWatchlistsOperations operations, string resour /// /// Watchlist Alias /// - public static void Delete(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias) + public static Watchlist Delete(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias) { - operations.DeleteAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult(); + return operations.DeleteAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult(); } /// @@ -145,15 +157,23 @@ public static void Delete(this IWatchlistsOperations operations, string resource /// /// The cancellation token. /// - public static async Task DeleteAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Creates or updates a watchlist and its watchlist items (bulk creation, e.g. - /// through text/csv content type). To create a Watchlist and its items, we - /// should call this endpoint with rawContent and contentType properties. + /// Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. + /// through text/csv content type). To create a Watchlist and its Items, we + /// should call this endpoint with either rawContent or a valid SAR URI and + /// contentType properties. The rawContent is mainly used for small watchlist + /// (content size below 3.8 MB). The SAS URI enables the creation of large + /// watchlist, where the content size can go up to 500 MB. The status of + /// processing such large file can be polled through the URL returned in + /// Azure-AsyncOperation header. /// /// /// The operations group for this extension method. @@ -176,9 +196,14 @@ public static Watchlist CreateOrUpdate(this IWatchlistsOperations operations, st } /// - /// Creates or updates a watchlist and its watchlist items (bulk creation, e.g. - /// through text/csv content type). To create a Watchlist and its items, we - /// should call this endpoint with rawContent and contentType properties. + /// Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. + /// through text/csv content type). To create a Watchlist and its Items, we + /// should call this endpoint with either rawContent or a valid SAR URI and + /// contentType properties. The rawContent is mainly used for small watchlist + /// (content size below 3.8 MB). The SAS URI enables the creation of large + /// watchlist, where the content size can go up to 500 MB. The status of + /// processing such large file can be polled through the URL returned in + /// Azure-AsyncOperation header. /// /// /// The operations group for this extension method.