diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperations.cs
index 2db369a32189..1bc78bd210d0 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperations.cs
@@ -87,7 +87,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "Client.SubscriptionId", "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -293,7 +293,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -466,7 +466,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListSubscriptionLevelAlertsByRegionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListSubscriptionLevelByRegionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -483,7 +483,7 @@ internal AlertsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -493,7 +493,7 @@ internal AlertsOperations(SecurityCenterClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListSubscriptionLevelAlertsByRegion", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListSubscriptionLevelByRegion", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -659,7 +659,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListResourceGroupLevelAlertsByRegionWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListResourceGroupLevelByRegionWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -695,7 +695,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -706,7 +706,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListResourceGroupLevelAlertsByRegion", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListResourceGroupLevelByRegion", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -871,7 +871,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetSubscriptionLevelAlertWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetSubscriptionLevelWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -892,7 +892,7 @@ internal AlertsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -903,7 +903,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetSubscriptionLevelAlert", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetSubscriptionLevel", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -1073,7 +1073,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetResourceGroupLevelAlertsWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetResourceGroupLevelWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1113,7 +1113,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1125,7 +1125,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetResourceGroupLevelAlerts", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetResourceGroupLevel", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -1288,7 +1288,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateSubscriptionLevelAlertStateToDismissWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1309,7 +1309,7 @@ internal AlertsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1320,7 +1320,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelAlertStateToDismiss", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelStateToDismiss", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -1485,7 +1485,7 @@ internal AlertsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1640,7 +1640,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateSubscriptionLevelAlertStateToReactivateWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1661,7 +1661,7 @@ internal AlertsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1672,7 +1672,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelAlertStateToReactivate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelStateToActivate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -1860,7 +1860,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2021,7 +2021,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateResourceGroupLevelAlertStateToDismissWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2061,7 +2061,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2073,7 +2073,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "UpdateResourceGroupLevelAlertStateToDismiss", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "UpdateResourceGroupLevelStateToDismiss", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -2222,7 +2222,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateResourceGroupLevelAlertStateToReactivateWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2262,7 +2262,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-01-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2274,7 +2274,7 @@ internal AlertsOperations(SecurityCenterClient client)
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "UpdateResourceGroupLevelAlertStateToReactivate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "UpdateResourceGroupLevelStateToActivate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -2395,6 +2395,207 @@ internal AlertsOperations(SecurityCenterClient client)
return _result;
}
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task SimulateWithHttpMessagesAsync(AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginSimulateWithHttpMessagesAsync(properties, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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 BeginSimulateWithHttpMessagesAsync(AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(Client.SubscriptionId, "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "Client.SubscriptionId", "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$");
+ }
+ }
+ if (Client.AscLocation == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ }
+ string apiVersion = "2021-01-01";
+ AlertSimulatorRequestBody alertSimulatorRequestBody = new AlertSimulatorRequestBody();
+ if (properties != null)
+ {
+ alertSimulatorRequestBody.Properties = properties;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("alertSimulatorRequestBody", alertSimulatorRequestBody);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginSimulate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/default/simulate").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("POST");
+ _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;
+ if(alertSimulatorRequestBody != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(alertSimulatorRequestBody, 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)
+ {
+ 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 != 202)
+ {
+ 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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// List all the alerts that are associated with the subscription
///
@@ -2769,7 +2970,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListSubscriptionLevelAlertsByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListSubscriptionLevelByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -2784,7 +2985,7 @@ internal AlertsOperations(SecurityCenterClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListSubscriptionLevelAlertsByRegionNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListSubscriptionLevelByRegionNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
@@ -2943,7 +3144,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListResourceGroupLevelAlertsByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListResourceGroupLevelByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -2958,7 +3159,7 @@ internal AlertsOperations(SecurityCenterClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListResourceGroupLevelAlertsByRegionNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListResourceGroupLevelByRegionNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperationsExtensions.cs
index a6fa8ea8e4ad..df7eed486658 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AlertsOperationsExtensions.cs
@@ -92,9 +92,9 @@ public static IPage ListByResourceGroup(this IAlertsOperations operations
///
/// The operations group for this extension method.
///
- public static IPage ListSubscriptionLevelAlertsByRegion(this IAlertsOperations operations)
+ public static IPage ListSubscriptionLevelByRegion(this IAlertsOperations operations)
{
- return operations.ListSubscriptionLevelAlertsByRegionAsync().GetAwaiter().GetResult();
+ return operations.ListSubscriptionLevelByRegionAsync().GetAwaiter().GetResult();
}
///
@@ -107,9 +107,9 @@ public static IPage ListSubscriptionLevelAlertsByRegion(this IAlertsOpera
///
/// The cancellation token.
///
- public static async Task> ListSubscriptionLevelAlertsByRegionAsync(this IAlertsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListSubscriptionLevelByRegionAsync(this IAlertsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListSubscriptionLevelAlertsByRegionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListSubscriptionLevelByRegionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -126,9 +126,9 @@ public static IPage ListSubscriptionLevelAlertsByRegion(this IAlertsOpera
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static IPage ListResourceGroupLevelAlertsByRegion(this IAlertsOperations operations, string resourceGroupName)
+ public static IPage ListResourceGroupLevelByRegion(this IAlertsOperations operations, string resourceGroupName)
{
- return operations.ListResourceGroupLevelAlertsByRegionAsync(resourceGroupName).GetAwaiter().GetResult();
+ return operations.ListResourceGroupLevelByRegionAsync(resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -145,9 +145,9 @@ public static IPage ListResourceGroupLevelAlertsByRegion(this IAlertsOper
///
/// The cancellation token.
///
- public static async Task> ListResourceGroupLevelAlertsByRegionAsync(this IAlertsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListResourceGroupLevelByRegionAsync(this IAlertsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListResourceGroupLevelAlertsByRegionWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListResourceGroupLevelByRegionWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -162,9 +162,9 @@ public static IPage ListResourceGroupLevelAlertsByRegion(this IAlertsOper
///
/// Name of the alert object
///
- public static Alert GetSubscriptionLevelAlert(this IAlertsOperations operations, string alertName)
+ public static Alert GetSubscriptionLevel(this IAlertsOperations operations, string alertName)
{
- return operations.GetSubscriptionLevelAlertAsync(alertName).GetAwaiter().GetResult();
+ return operations.GetSubscriptionLevelAsync(alertName).GetAwaiter().GetResult();
}
///
@@ -179,9 +179,9 @@ public static Alert GetSubscriptionLevelAlert(this IAlertsOperations operations,
///
/// The cancellation token.
///
- public static async Task GetSubscriptionLevelAlertAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetSubscriptionLevelAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetSubscriptionLevelAlertWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetSubscriptionLevelWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -201,9 +201,9 @@ public static Alert GetSubscriptionLevelAlert(this IAlertsOperations operations,
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static Alert GetResourceGroupLevelAlerts(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static Alert GetResourceGroupLevel(this IAlertsOperations operations, string alertName, string resourceGroupName)
{
- return operations.GetResourceGroupLevelAlertsAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ return operations.GetResourceGroupLevelAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -223,9 +223,9 @@ public static Alert GetResourceGroupLevelAlerts(this IAlertsOperations operation
///
/// The cancellation token.
///
- public static async Task GetResourceGroupLevelAlertsAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetResourceGroupLevelAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetResourceGroupLevelAlertsWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetResourceGroupLevelWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -240,9 +240,9 @@ public static Alert GetResourceGroupLevelAlerts(this IAlertsOperations operation
///
/// Name of the alert object
///
- public static void UpdateSubscriptionLevelAlertStateToDismiss(this IAlertsOperations operations, string alertName)
+ public static void UpdateSubscriptionLevelStateToDismiss(this IAlertsOperations operations, string alertName)
{
- operations.UpdateSubscriptionLevelAlertStateToDismissAsync(alertName).GetAwaiter().GetResult();
+ operations.UpdateSubscriptionLevelStateToDismissAsync(alertName).GetAwaiter().GetResult();
}
///
@@ -257,9 +257,9 @@ public static void UpdateSubscriptionLevelAlertStateToDismiss(this IAlertsOperat
///
/// The cancellation token.
///
- public static async Task UpdateSubscriptionLevelAlertStateToDismissAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateSubscriptionLevelStateToDismissAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateSubscriptionLevelAlertStateToDismissWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -302,9 +302,9 @@ public static void UpdateSubscriptionLevelStateToResolve(this IAlertsOperations
///
/// Name of the alert object
///
- public static void UpdateSubscriptionLevelAlertStateToReactivate(this IAlertsOperations operations, string alertName)
+ public static void UpdateSubscriptionLevelStateToActivate(this IAlertsOperations operations, string alertName)
{
- operations.UpdateSubscriptionLevelAlertStateToReactivateAsync(alertName).GetAwaiter().GetResult();
+ operations.UpdateSubscriptionLevelStateToActivateAsync(alertName).GetAwaiter().GetResult();
}
///
@@ -319,9 +319,9 @@ public static void UpdateSubscriptionLevelAlertStateToReactivate(this IAlertsOpe
///
/// The cancellation token.
///
- public static async Task UpdateSubscriptionLevelAlertStateToReactivateAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateSubscriptionLevelStateToActivateAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateSubscriptionLevelAlertStateToReactivateWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -376,9 +376,9 @@ public static void UpdateResourceGroupLevelStateToResolve(this IAlertsOperations
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static void UpdateResourceGroupLevelAlertStateToDismiss(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static void UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations operations, string alertName, string resourceGroupName)
{
- operations.UpdateResourceGroupLevelAlertStateToDismissAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ operations.UpdateResourceGroupLevelStateToDismissAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -397,9 +397,9 @@ public static void UpdateResourceGroupLevelAlertStateToDismiss(this IAlertsOpera
///
/// The cancellation token.
///
- public static async Task UpdateResourceGroupLevelAlertStateToDismissAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateResourceGroupLevelStateToDismissAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateResourceGroupLevelAlertStateToDismissWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -415,9 +415,9 @@ public static void UpdateResourceGroupLevelAlertStateToDismiss(this IAlertsOpera
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static void UpdateResourceGroupLevelAlertStateToReactivate(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperations operations, string alertName, string resourceGroupName)
{
- operations.UpdateResourceGroupLevelAlertStateToReactivateAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ operations.UpdateResourceGroupLevelStateToActivateAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -436,9 +436,71 @@ public static void UpdateResourceGroupLevelAlertStateToReactivate(this IAlertsOp
///
/// The cancellation token.
///
- public static async Task UpdateResourceGroupLevelAlertStateToReactivateAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateResourceGroupLevelStateToActivateAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateResourceGroupLevelAlertStateToReactivateWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ public static void Simulate(this IAlertsOperations operations, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties))
+ {
+ operations.SimulateAsync(properties).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task SimulateAsync(this IAlertsOperations operations, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.SimulateWithHttpMessagesAsync(properties, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ public static void BeginSimulate(this IAlertsOperations operations, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties))
+ {
+ operations.BeginSimulateAsync(properties).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginSimulateAsync(this IAlertsOperations operations, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginSimulateWithHttpMessagesAsync(properties, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -519,9 +581,9 @@ public static IPage ListByResourceGroupNext(this IAlertsOperations operat
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage ListSubscriptionLevelAlertsByRegionNext(this IAlertsOperations operations, string nextPageLink)
+ public static IPage ListSubscriptionLevelByRegionNext(this IAlertsOperations operations, string nextPageLink)
{
- return operations.ListSubscriptionLevelAlertsByRegionNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return operations.ListSubscriptionLevelByRegionNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
@@ -537,9 +599,9 @@ public static IPage ListSubscriptionLevelAlertsByRegionNext(this IAlertsO
///
/// The cancellation token.
///
- public static async Task> ListSubscriptionLevelAlertsByRegionNextAsync(this IAlertsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListSubscriptionLevelByRegionNextAsync(this IAlertsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListSubscriptionLevelAlertsByRegionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListSubscriptionLevelByRegionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -555,9 +617,9 @@ public static IPage ListSubscriptionLevelAlertsByRegionNext(this IAlertsO
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage ListResourceGroupLevelAlertsByRegionNext(this IAlertsOperations operations, string nextPageLink)
+ public static IPage ListResourceGroupLevelByRegionNext(this IAlertsOperations operations, string nextPageLink)
{
- return operations.ListResourceGroupLevelAlertsByRegionNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return operations.ListResourceGroupLevelByRegionNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
@@ -573,9 +635,9 @@ public static IPage ListResourceGroupLevelAlertsByRegionNext(this IAlerts
///
/// The cancellation token.
///
- public static async Task> ListResourceGroupLevelAlertsByRegionNextAsync(this IAlertsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListResourceGroupLevelByRegionNextAsync(this IAlertsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListResourceGroupLevelAlertsByRegionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListResourceGroupLevelByRegionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IAlertsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IAlertsOperations.cs
index c494d1bdb73e..2e56aeefc2b3 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IAlertsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IAlertsOperations.cs
@@ -84,7 +84,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListSubscriptionLevelAlertsByRegionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListSubscriptionLevelByRegionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// List all the alerts that are associated with the resource group
/// that are stored in a specific location
@@ -108,7 +108,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListResourceGroupLevelAlertsByRegionWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListResourceGroupLevelByRegionWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get an alert that is associated with a subscription
///
@@ -130,7 +130,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetSubscriptionLevelAlertWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetSubscriptionLevelWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get an alert that is associated a resource group or a resource in a
/// resource group
@@ -157,7 +157,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetResourceGroupLevelAlertsWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetResourceGroupLevelWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Update the alert's state
///
@@ -176,7 +176,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task UpdateSubscriptionLevelAlertStateToDismissWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Update the alert's state
///
@@ -214,7 +214,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task UpdateSubscriptionLevelAlertStateToReactivateWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Update the alert's state
///
@@ -260,7 +260,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task UpdateResourceGroupLevelAlertStateToDismissWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Update the alert's state
///
@@ -283,7 +283,45 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task UpdateResourceGroupLevelAlertStateToReactivateWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task SimulateWithHttpMessagesAsync(AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Simulate security alerts
+ ///
+ ///
+ /// Alert Simulator request body data.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginSimulateWithHttpMessagesAsync(AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// List all the alerts that are associated with the subscription
///
@@ -350,7 +388,7 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListSubscriptionLevelAlertsByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListSubscriptionLevelByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// List all the alerts that are associated with the resource group
/// that are stored in a specific location
@@ -373,6 +411,6 @@ public partial interface IAlertsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListResourceGroupLevelAlertsByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListResourceGroupLevelByRegionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotDefenderSettingsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotDefenderSettingsOperations.cs
index bed2a48cabac..a1bdc65137c0 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotDefenderSettingsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotDefenderSettingsOperations.cs
@@ -15,6 +15,7 @@ namespace Microsoft.Azure.Management.Security
using Models;
using System.Collections;
using System.Collections.Generic;
+ using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -122,5 +123,24 @@ public partial interface IIotDefenderSettingsOperations
/// Thrown when a required parameter is null
///
Task> PackageDownloadsMethodWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Download manager activation data defined for this subscription
+ ///
+ ///
+ /// 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> DownloadManagerActivationWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSensorsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSensorsOperations.cs
index 4af820d975d9..71c16af8b97b 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSensorsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSensorsOperations.cs
@@ -72,7 +72,7 @@ public partial interface IIotSensorsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or update IoT sensor
///
@@ -83,6 +83,9 @@ public partial interface IIotSensorsOperations
///
/// Name of the IoT sensor
///
+ ///
+ /// The IoT sensor model
+ ///
///
/// The headers that will be added to request.
///
@@ -98,7 +101,7 @@ public partial interface IIotSensorsOperations
///
/// Thrown when a required parameter is null
///
- Task> CreateOrUpdateWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string scope, string iotSensorName, IotSensorsModel iotSensorsModel, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Delete IoT sensor
///
@@ -148,5 +151,57 @@ public partial interface IIotSensorsOperations
/// Thrown when a required parameter is null
///
Task> DownloadActivationWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// Scope of the query (IoT Hub,
+ /// /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ ///
+ /// 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> DownloadResetPasswordWithHttpMessagesAsync(string scope, string iotSensorName, string applianceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Trigger threat intelligence package update
+ ///
+ ///
+ /// Scope of the query (IoT Hub,
+ /// /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task TriggerTiPackageUpdateWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSitesOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSitesOperations.cs
new file mode 100644
index 000000000000..f3812984e2b5
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IIotSitesOperations.cs
@@ -0,0 +1,122 @@
+//
+// 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.Security
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// IotSitesOperations operations.
+ ///
+ public partial interface IIotSitesOperations
+ {
+ ///
+ /// List IoT sites
+ ///
+ ///
+ /// Scope of the query (IoT Hub,
+ /// /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// 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> ListWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get IoT site
+ ///
+ ///
+ /// Scope of the query (IoT Hub,
+ /// /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update IoT site
+ ///
+ ///
+ /// Scope of the query (IoT Hub,
+ /// /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Display name of the IoT site
+ ///
+ ///
+ /// Tags of the IoT site
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string scope, string displayName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete IoT site
+ ///
+ ///
+ /// Scope of the query (IoT Hub,
+ /// /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IOnPremiseIotSensorsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IOnPremiseIotSensorsOperations.cs
index c0a284754602..7c268a868213 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IOnPremiseIotSensorsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IOnPremiseIotSensorsOperations.cs
@@ -128,5 +128,30 @@ public partial interface IOnPremiseIotSensorsOperations
/// Thrown when a required parameter is null
///
Task> DownloadActivationWithHttpMessagesAsync(string onPremiseIotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// Name of the on-premise IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ ///
+ /// 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> DownloadResetPasswordWithHttpMessagesAsync(string onPremiseIotSensorName, string applianceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/ISecurityCenterClient.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/ISecurityCenterClient.cs
index 9e8b01ad5fbd..8d818577c5b5 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/ISecurityCenterClient.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/ISecurityCenterClient.cs
@@ -241,11 +241,6 @@ public partial interface ISecurityCenterClient : System.IDisposable
///
ITopologyOperations Topology { get; }
- ///
- /// Gets the IAlertsOperations.
- ///
- IAlertsOperations Alerts { get; }
-
///
/// Gets the IJitNetworkAccessPoliciesOperations.
///
@@ -336,5 +331,15 @@ public partial interface ISecurityCenterClient : System.IDisposable
///
IOnPremiseIotSensorsOperations OnPremiseIotSensors { get; }
+ ///
+ /// Gets the IIotSitesOperations.
+ ///
+ IIotSitesOperations IotSites { get; }
+
+ ///
+ /// Gets the IAlertsOperations.
+ ///
+ IAlertsOperations Alerts { get; }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IServerVulnerabilityAssessmentOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IServerVulnerabilityAssessmentOperations.cs
index fac304bd74b5..10e0d65f0c6c 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IServerVulnerabilityAssessmentOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IServerVulnerabilityAssessmentOperations.cs
@@ -151,5 +151,34 @@ public partial interface IServerVulnerabilityAssessmentOperations
/// Thrown when a required parameter is null
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Removing server vulnerability assessment from a resource.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription. The
+ /// name is case insensitive.
+ ///
+ ///
+ /// The Namespace of the resource.
+ ///
+ ///
+ /// The type of the resource.
+ ///
+ ///
+ /// Name of the resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperations.cs
index 40ddad2dc077..40070cf82a9a 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperations.cs
@@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Security
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
+ using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
@@ -990,5 +991,175 @@ internal IotDefenderSettingsOperations(SecurityCenterClient client)
return _result;
}
+ ///
+ /// Download manager activation data defined for this subscription
+ ///
+ ///
+ /// 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> DownloadManagerActivationWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(Client.SubscriptionId, "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "Client.SubscriptionId", "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$");
+ }
+ }
+ string apiVersion = "2020-08-06-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "DownloadManagerActivation", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/iotDefenderSettings/default/downloadManagerActivation").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("POST");
+ _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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)
+ {
+ _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperationsExtensions.cs
index caddc0e95049..dd2ad1cbf095 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotDefenderSettingsOperationsExtensions.cs
@@ -15,6 +15,7 @@ namespace Microsoft.Azure.Management.Security
using Models;
using System.Collections;
using System.Collections.Generic;
+ using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -174,5 +175,32 @@ public static PackageDownloads PackageDownloadsMethod(this IIotDefenderSettingsO
}
}
+ ///
+ /// Download manager activation data defined for this subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static Stream DownloadManagerActivation(this IIotDefenderSettingsOperations operations)
+ {
+ return operations.DownloadManagerActivationAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Download manager activation data defined for this subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DownloadManagerActivationAsync(this IIotDefenderSettingsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var _result = await operations.DownloadManagerActivationWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false);
+ _result.Request.Dispose();
+ return _result.Body;
+ }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperations.cs
index 45873dc507b1..c4ebec771540 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperations.cs
@@ -261,7 +261,7 @@ internal IotSensorsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (scope == null)
{
@@ -388,7 +388,7 @@ internal IotSensorsOperations(SecurityCenterClient 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"))
@@ -401,7 +401,7 @@ internal IotSensorsOperations(SecurityCenterClient 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)
{
@@ -429,6 +429,9 @@ internal IotSensorsOperations(SecurityCenterClient client)
///
/// Name of the IoT sensor
///
+ ///
+ /// The IoT sensor model
+ ///
///
/// Headers that will be added to request.
///
@@ -450,7 +453,7 @@ internal IotSensorsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string scope, string iotSensorName, IotSensorsModel iotSensorsModel, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (scope == null)
{
@@ -460,6 +463,10 @@ internal IotSensorsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "iotSensorName");
}
+ if (iotSensorsModel == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "iotSensorsModel");
+ }
string apiVersion = "2020-08-06-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -471,6 +478,7 @@ internal IotSensorsOperations(SecurityCenterClient client)
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("scope", scope);
tracingParameters.Add("iotSensorName", iotSensorName);
+ tracingParameters.Add("iotSensorsModel", iotSensorsModel);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
}
@@ -522,6 +530,12 @@ internal IotSensorsOperations(SecurityCenterClient client)
// Serialize Request
string _requestContent = null;
+ if(iotSensorsModel != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(iotSensorsModel, 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)
{
@@ -577,7 +591,7 @@ internal IotSensorsOperations(SecurityCenterClient 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"))
@@ -590,7 +604,7 @@ internal IotSensorsOperations(SecurityCenterClient 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)
{
@@ -608,7 +622,7 @@ internal IotSensorsOperations(SecurityCenterClient 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)
{
@@ -971,5 +985,364 @@ internal IotSensorsOperations(SecurityCenterClient client)
return _result;
}
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ ///
+ /// 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> DownloadResetPasswordWithHttpMessagesAsync(string scope, string iotSensorName, string applianceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ if (iotSensorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "iotSensorName");
+ }
+ string apiVersion = "2020-08-06-preview";
+ ResetPasswordInput body = new ResetPasswordInput();
+ if (applianceId != null)
+ {
+ body.ApplianceId = applianceId;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("iotSensorName", iotSensorName);
+ tracingParameters.Add("body", body);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "DownloadResetPassword", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/downloadResetPassword").ToString();
+ _url = _url.Replace("{scope}", scope);
+ _url = _url.Replace("{iotSensorName}", System.Uri.EscapeDataString(iotSensorName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("POST");
+ _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;
+ if(body != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, 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)
+ {
+ 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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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)
+ {
+ _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Trigger threat intelligence package update
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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 TriggerTiPackageUpdateWithHttpMessagesAsync(string scope, string iotSensorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ if (iotSensorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "iotSensorName");
+ }
+ string apiVersion = "2020-08-06-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("iotSensorName", iotSensorName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "TriggerTiPackageUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Security/iotSensors/{iotSensorName}/triggerTiPackageUpdate").ToString();
+ _url = _url.Replace("{scope}", scope);
+ _url = _url.Replace("{iotSensorName}", System.Uri.EscapeDataString(iotSensorName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("POST");
+ _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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperationsExtensions.cs
index c5d3a27e2f22..8b493b1ce546 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSensorsOperationsExtensions.cs
@@ -68,7 +68,7 @@ public static IotSensorsList List(this IIotSensorsOperations operations, string
///
/// Name of the IoT sensor
///
- public static IotSensor Get(this IIotSensorsOperations operations, string scope, string iotSensorName)
+ public static IotSensorsModel Get(this IIotSensorsOperations operations, string scope, string iotSensorName)
{
return operations.GetAsync(scope, iotSensorName).GetAwaiter().GetResult();
}
@@ -88,7 +88,7 @@ public static IotSensor Get(this IIotSensorsOperations operations, string scope,
///
/// The cancellation token.
///
- public static async Task GetAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(scope, iotSensorName, null, cancellationToken).ConfigureAwait(false))
{
@@ -108,9 +108,12 @@ public static IotSensor Get(this IIotSensorsOperations operations, string scope,
///
/// Name of the IoT sensor
///
- public static IotSensor CreateOrUpdate(this IIotSensorsOperations operations, string scope, string iotSensorName)
+ ///
+ /// The IoT sensor model
+ ///
+ public static IotSensorsModel CreateOrUpdate(this IIotSensorsOperations operations, string scope, string iotSensorName, IotSensorsModel iotSensorsModel)
{
- return operations.CreateOrUpdateAsync(scope, iotSensorName).GetAwaiter().GetResult();
+ return operations.CreateOrUpdateAsync(scope, iotSensorName, iotSensorsModel).GetAwaiter().GetResult();
}
///
@@ -125,12 +128,15 @@ public static IotSensor CreateOrUpdate(this IIotSensorsOperations operations, st
///
/// Name of the IoT sensor
///
+ ///
+ /// The IoT sensor model
+ ///
///
/// The cancellation token.
///
- public static async Task CreateOrUpdateAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task CreateOrUpdateAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, IotSensorsModel iotSensorsModel, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, iotSensorName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, iotSensorName, iotSensorsModel, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -212,5 +218,87 @@ public static Stream DownloadActivation(this IIotSensorsOperations operations, s
return _result.Body;
}
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ public static Stream DownloadResetPassword(this IIotSensorsOperations operations, string scope, string iotSensorName, string applianceId = default(string))
+ {
+ return operations.DownloadResetPasswordAsync(scope, iotSensorName, applianceId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DownloadResetPasswordAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, string applianceId = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var _result = await operations.DownloadResetPasswordWithHttpMessagesAsync(scope, iotSensorName, applianceId, null, cancellationToken).ConfigureAwait(false);
+ _result.Request.Dispose();
+ return _result.Body;
+ }
+
+ ///
+ /// Trigger threat intelligence package update
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ public static void TriggerTiPackageUpdate(this IIotSensorsOperations operations, string scope, string iotSensorName)
+ {
+ operations.TriggerTiPackageUpdateAsync(scope, iotSensorName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Trigger threat intelligence package update
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Name of the IoT sensor
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task TriggerTiPackageUpdateAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.TriggerTiPackageUpdateWithHttpMessagesAsync(scope, iotSensorName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSitesOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSitesOperations.cs
new file mode 100644
index 000000000000..8a429fe9ed7f
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSitesOperations.cs
@@ -0,0 +1,794 @@
+//
+// 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.Security
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// IotSitesOperations operations.
+ ///
+ internal partial class IotSitesOperations : IServiceOperations, IIotSitesOperations
+ {
+ ///
+ /// Initializes a new instance of the IotSitesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal IotSitesOperations(SecurityCenterClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the SecurityCenterClient
+ ///
+ public SecurityCenterClient Client { get; private set; }
+
+ ///
+ /// List IoT sites
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// 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 scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ string apiVersion = "2020-08-06-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("scope", scope);
+ 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("/") ? "" : "/")), "{scope}/providers/Microsoft.Security/iotSites").ToString();
+ _url = _url.Replace("{scope}", scope);
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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;
+ }
+
+ ///
+ /// Get IoT site
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ string apiVersion = "2020-08-06-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Security/iotSites/default").ToString();
+ _url = _url.Replace("{scope}", scope);
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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;
+ }
+
+ ///
+ /// Create or update IoT site
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Display name of the IoT site
+ ///
+ ///
+ /// Tags of the IoT site
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string scope, string displayName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ if (displayName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "displayName");
+ }
+ string apiVersion = "2020-08-06-preview";
+ IotSitesModel iotSitesModel = new IotSitesModel();
+ if (displayName != null || tags != null)
+ {
+ iotSitesModel.DisplayName = displayName;
+ iotSitesModel.Tags = tags;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("iotSitesModel", iotSitesModel);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Security/iotSites/default").ToString();
+ _url = _url.Replace("{scope}", scope);
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("PUT");
+ _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;
+ if(iotSitesModel != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(iotSitesModel, 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)
+ {
+ 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 && (int)_statusCode != 201)
+ {
+ 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);
+ }
+ }
+ // 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);
+ }
+ return _result;
+ }
+
+ ///
+ /// Delete IoT site
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (scope == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "scope");
+ }
+ string apiVersion = "2020-08-06-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("scope", scope);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{scope}/providers/Microsoft.Security/iotSites/default").ToString();
+ _url = _url.Replace("{scope}", scope);
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("DELETE");
+ _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 && (int)_statusCode != 204)
+ {
+ 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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSitesOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSitesOperationsExtensions.cs
new file mode 100644
index 000000000000..91350e58c066
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/IotSitesOperationsExtensions.cs
@@ -0,0 +1,172 @@
+//
+// 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.Security
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for IotSitesOperations.
+ ///
+ public static partial class IotSitesOperationsExtensions
+ {
+ ///
+ /// List IoT sites
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ public static IotSitesList List(this IIotSitesOperations operations, string scope)
+ {
+ return operations.ListAsync(scope).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List IoT sites
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListAsync(this IIotSitesOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get IoT site
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ public static IotSitesModel Get(this IIotSitesOperations operations, string scope)
+ {
+ return operations.GetAsync(scope).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get IoT site
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IIotSitesOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update IoT site
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Display name of the IoT site
+ ///
+ ///
+ /// Tags of the IoT site
+ ///
+ public static IotSitesModel CreateOrUpdate(this IIotSitesOperations operations, string scope, string displayName, IDictionary tags = default(IDictionary))
+ {
+ return operations.CreateOrUpdateAsync(scope, displayName, tags).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update IoT site
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// Display name of the IoT site
+ ///
+ ///
+ /// Tags of the IoT site
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IIotSitesOperations operations, string scope, string displayName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, displayName, tags, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete IoT site
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ public static void Delete(this IIotSitesOperations operations, string scope)
+ {
+ operations.DeleteAsync(scope).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete IoT site
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IIotSitesOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.cs
index 3c4aefd5b0a4..1d901cbc4a88 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of active connections is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("ActiveConnectionsNotInAllowedRange")]
public partial class ActiveConnectionsNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalData.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalData.cs
index efcb3ced1b86..a052f822516a 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalData.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalData.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Details of the sub-assessment
///
- [Newtonsoft.Json.JsonObject("AdditionalData")]
public partial class AdditionalData
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspaceDataType.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspaceDataType.cs
new file mode 100644
index 000000000000..676173dbafca
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspaceDataType.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.Security.Models
+{
+
+ ///
+ /// Defines values for AdditionalWorkspaceDataType.
+ ///
+ public static class AdditionalWorkspaceDataType
+ {
+ public const string Alerts = "Alerts";
+ public const string RawEvents = "RawEvents";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspaceType.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspaceType.cs
new file mode 100644
index 000000000000..62a80cafd8d8
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspaceType.cs
@@ -0,0 +1,21 @@
+//
+// 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.Security.Models
+{
+
+ ///
+ /// Defines values for AdditionalWorkspaceType.
+ ///
+ public static class AdditionalWorkspaceType
+ {
+ public const string Sentinel = "Sentinel";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.cs
new file mode 100644
index 000000000000..832e8fc248f4
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.cs
@@ -0,0 +1,73 @@
+//
+// 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.Security.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Properties of the additional workspaces.
+ ///
+ public partial class AdditionalWorkspacesProperties
+ {
+ ///
+ /// Initializes a new instance of the AdditionalWorkspacesProperties
+ /// class.
+ ///
+ public AdditionalWorkspacesProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AdditionalWorkspacesProperties
+ /// class.
+ ///
+ /// Workspace resource id
+ /// Workspace type. Possible values include:
+ /// 'Sentinel'
+ /// List of data types sent to
+ /// workspace
+ public AdditionalWorkspacesProperties(string workspace = default(string), string type = default(string), IList dataTypes = default(IList))
+ {
+ Workspace = workspace;
+ Type = type;
+ DataTypes = dataTypes;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets workspace resource id
+ ///
+ [JsonProperty(PropertyName = "workspace")]
+ public string Workspace { get; set; }
+
+ ///
+ /// Gets or sets workspace type. Possible values include: 'Sentinel'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets list of data types sent to workspace
+ ///
+ [JsonProperty(PropertyName = "dataTypes")]
+ public IList DataTypes { get; set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorBundlesRequestProperties.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorBundlesRequestProperties.cs
new file mode 100644
index 000000000000..04aa34c27f51
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorBundlesRequestProperties.cs
@@ -0,0 +1,59 @@
+//
+// 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.Security.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Simulate alerts according to this bundles.
+ ///
+ [Newtonsoft.Json.JsonObject("Bundles")]
+ public partial class AlertSimulatorBundlesRequestProperties : AlertSimulatorRequestProperties
+ {
+ ///
+ /// Initializes a new instance of the
+ /// AlertSimulatorBundlesRequestProperties class.
+ ///
+ public AlertSimulatorBundlesRequestProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// AlertSimulatorBundlesRequestProperties class.
+ ///
+ /// Unmatched properties from the
+ /// message are deserialized this collection
+ /// Bundles list.
+ public AlertSimulatorBundlesRequestProperties(IDictionary additionalProperties = default(IDictionary), IList bundles = default(IList))
+ : base(additionalProperties)
+ {
+ Bundles = bundles;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets bundles list.
+ ///
+ [JsonProperty(PropertyName = "bundles")]
+ public IList Bundles { get; set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensor.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorRequestBody.cs
similarity index 58%
rename from sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensor.cs
rename to sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorRequestBody.cs
index a78e65a6ae6b..c8bbb95a1506 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensor.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorRequestBody.cs
@@ -14,27 +14,23 @@ namespace Microsoft.Azure.Management.Security.Models
using System.Linq;
///
- /// IoT sensor
+ /// Alert Simulator request body.
///
- public partial class IotSensor : Resource
+ public partial class AlertSimulatorRequestBody
{
///
- /// Initializes a new instance of the IotSensor class.
+ /// Initializes a new instance of the AlertSimulatorRequestBody class.
///
- public IotSensor()
+ public AlertSimulatorRequestBody()
{
CustomInit();
}
///
- /// Initializes a new instance of the IotSensor class.
+ /// Initializes a new instance of the AlertSimulatorRequestBody class.
///
- /// Resource Id
- /// Resource name
- /// Resource type
- /// IoT sensor properties
- public IotSensor(string id = default(string), string name = default(string), string type = default(string), object properties = default(object))
- : base(id, name, type)
+ /// Alert Simulator request body data.
+ public AlertSimulatorRequestBody(AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties))
{
Properties = properties;
CustomInit();
@@ -46,10 +42,10 @@ public IotSensor()
partial void CustomInit();
///
- /// Gets or sets ioT sensor properties
+ /// Gets or sets alert Simulator request body data.
///
[JsonProperty(PropertyName = "properties")]
- public object Properties { get; set; }
+ public AlertSimulatorRequestProperties Properties { get; set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorRequestProperties.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorRequestProperties.cs
new file mode 100644
index 000000000000..eed55ecbc415
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AlertSimulatorRequestProperties.cs
@@ -0,0 +1,57 @@
+//
+// 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.Security.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes properties of an alert simulation request
+ ///
+ public partial class AlertSimulatorRequestProperties
+ {
+ ///
+ /// Initializes a new instance of the AlertSimulatorRequestProperties
+ /// class.
+ ///
+ public AlertSimulatorRequestProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AlertSimulatorRequestProperties
+ /// class.
+ ///
+ /// Unmatched properties from the
+ /// message are deserialized this collection
+ public AlertSimulatorRequestProperties(IDictionary additionalProperties = default(IDictionary))
+ {
+ AdditionalProperties = additionalProperties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets unmatched properties from the message are deserialized
+ /// this collection
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.cs
index 9033e1abbffb..4f1823712b08 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// A custom alert rule that checks if a value (depends on the custom alert
/// type) is allowed.
///
- [Newtonsoft.Json.JsonObject("AllowlistCustomAlertRule")]
public partial class AllowlistCustomAlertRule : ListCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.cs
index 83fcf7eef6d5..1ec0be41d31f 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of cloud to device messages (AMQP protocol) is not in allowed
/// range.
///
- [Newtonsoft.Json.JsonObject("AmqpC2DMessagesNotInAllowedRange")]
public partial class AmqpC2DMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.cs
index 61375802e9ea..27ca3c49286e 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of rejected cloud to device messages (AMQP protocol) is not in
/// allowed range.
///
- [Newtonsoft.Json.JsonObject("AmqpC2DRejectedMessagesNotInAllowedRange")]
public partial class AmqpC2DRejectedMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.cs
index fd6dd48b1060..8061c59a72ce 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of device to cloud messages (AMQP protocol) is not in allowed
/// range.
///
- [Newtonsoft.Json.JsonObject("AmqpD2CMessagesNotInAllowedRange")]
public partial class AmqpD2CMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.cs
index bf9f8117be03..4e15389c098a 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.cs
@@ -18,7 +18,6 @@ namespace Microsoft.Azure.Management.Security.Models
///
/// Settings for cloud authentication management
///
- [Newtonsoft.Json.JsonObject("AuthenticationDetailsProperties")]
public partial class AuthenticationDetailsProperties
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationAction.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationAction.cs
index e486a3ba01b9..921ecb8ffaf1 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationAction.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationAction.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// The action that should be triggered.
///
- [Newtonsoft.Json.JsonObject("AutomationAction")]
public partial class AutomationAction
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationSource.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationSource.cs
index 8bdc7a2c40c1..9e48941ebb18 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationSource.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/AutomationSource.cs
@@ -35,7 +35,10 @@ public AutomationSource()
/// Initializes a new instance of the AutomationSource class.
///
/// A valid event source type. Possible
- /// values include: 'Assessments', 'SubAssessments', 'Alerts'
+ /// values include: 'Assessments', 'SubAssessments', 'Alerts',
+ /// 'SecureScores', 'SecureScoresSnapshot', 'SecureScoreControls',
+ /// 'SecureScoreControlsSnapshot', 'RegulatoryComplianceAssessment',
+ /// 'RegulatoryComplianceAssessmentSnapshot'
/// A set of rules which evaluate upon event
/// interception. A logical disjunction is applied between defined rule
/// sets (logical 'or').
@@ -53,7 +56,10 @@ public AutomationSource()
///
/// Gets or sets a valid event source type. Possible values include:
- /// 'Assessments', 'SubAssessments', 'Alerts'
+ /// 'Assessments', 'SubAssessments', 'Alerts', 'SecureScores',
+ /// 'SecureScoresSnapshot', 'SecureScoreControls',
+ /// 'SecureScoreControlsSnapshot', 'RegulatoryComplianceAssessment',
+ /// 'RegulatoryComplianceAssessmentSnapshot'
///
[JsonProperty(PropertyName = "eventSource")]
public string EventSource { get; set; }
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/BundleType.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/BundleType.cs
new file mode 100644
index 000000000000..60da8696f4e5
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/BundleType.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.Security.Models
+{
+
+ ///
+ /// Defines values for BundleType.
+ ///
+ public static class BundleType
+ {
+ public const string AppServices = "AppServices";
+ public const string DNS = "DNS";
+ public const string KeyVaults = "KeyVaults";
+ public const string KubernetesService = "KubernetesService";
+ public const string ResourceManager = "ResourceManager";
+ public const string SqlServers = "SqlServers";
+ public const string StorageAccounts = "StorageAccounts";
+ public const string VirtualMachines = "VirtualMachines";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionFromIpNotAllowed.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionFromIpNotAllowed.cs
new file mode 100644
index 000000000000..1c567d2fc44c
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionFromIpNotAllowed.cs
@@ -0,0 +1,65 @@
+//
+// 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.Security.Models
+{
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Inbound connection from an ip that isn't allowed. Allow list consists
+ /// of ipv4 or ipv6 range in CIDR notation.
+ ///
+ public partial class ConnectionFromIpNotAllowed : AllowlistCustomAlertRule
+ {
+ ///
+ /// Initializes a new instance of the ConnectionFromIpNotAllowed class.
+ ///
+ public ConnectionFromIpNotAllowed()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ConnectionFromIpNotAllowed class.
+ ///
+ /// Status of the custom alert.
+ /// The values to allow. The format of
+ /// the values depends on the rule type.
+ /// The display name of the custom
+ /// alert.
+ /// The description of the custom
+ /// alert.
+ /// The value type of the items in the list.
+ /// Possible values include: 'IpCidr', 'String'
+ public ConnectionFromIpNotAllowed(bool isEnabled, IList allowlistValues, string displayName = default(string), string description = default(string), string valueType = default(string))
+ : base(isEnabled, allowlistValues, displayName, description, valueType)
+ {
+ 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/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionToIpNotAllowed.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionToIpNotAllowed.cs
index 19cc63c8934c..16d02941054a 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionToIpNotAllowed.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ConnectionToIpNotAllowed.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -19,7 +18,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// Outbound connection to an ip that isn't allowed. Allow list consists of
/// ipv4 or ipv6 range in CIDR notation.
///
- [Newtonsoft.Json.JsonObject("ConnectionToIpNotAllowed")]
public partial class ConnectionToIpNotAllowed : AllowlistCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CreatedByType.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 000000000000..a18acdd38fdf
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CreatedByType.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.Security.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CustomAlertRule.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CustomAlertRule.cs
index a581bbf4f832..c52d16896c22 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CustomAlertRule.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/CustomAlertRule.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Security.Models
///
/// A custom alert rule.
///
- [Newtonsoft.Json.JsonObject("CustomAlertRule")]
public partial class CustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DataExportSettings.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DataExportSettings.cs
index 3c01ebcc5c17..9d743cb001b5 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DataExportSettings.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DataExportSettings.cs
@@ -18,7 +18,6 @@ namespace Microsoft.Azure.Management.Security.Models
///
/// Represents a data export setting
///
- [Newtonsoft.Json.JsonObject("DataExportSettings")]
[Rest.Serialization.JsonTransformation]
public partial class DataExportSettings : Setting
{
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.cs
index 1bfe4ef2944a..fefdebb7ccad 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// A custom alert rule that checks if a value (depends on the custom alert
/// type) is denied.
///
- [Newtonsoft.Json.JsonObject("DenylistCustomAlertRule")]
public partial class DenylistCustomAlertRule : ListCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Device.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Device.cs
index 3b43ed623c18..1e41a249b2cf 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Device.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Device.cs
@@ -269,16 +269,13 @@ public Device()
///
public virtual void Validate()
{
- if (RiskScore != null)
+ if (RiskScore > 100)
{
- if (RiskScore > 100)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "RiskScore", 100);
- }
- if (RiskScore < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "RiskScore", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "RiskScore", 100);
+ }
+ if (RiskScore < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "RiskScore", 0);
}
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.cs
index 5965d3547967..efb160b104ec 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of direct method invokes is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("DirectMethodInvokesNotInAllowedRange")]
public partial class DirectMethodInvokesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..9beab3502ae2
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ErrorAdditionalInfo.cs
@@ -0,0 +1,59 @@
+//
+// 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.Security.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource management error additional info.
+ ///
+ public partial class ErrorAdditionalInfo
+ {
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ public ErrorAdditionalInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ /// The additional info type.
+ /// The additional info.
+ public ErrorAdditionalInfo(string type = default(string), object info = default(object))
+ {
+ Type = type;
+ Info = info;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the additional info type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets the additional info.
+ ///
+ [JsonProperty(PropertyName = "info")]
+ public object Info { get; private set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/EventSource.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/EventSource.cs
index 33c257f4f0b4..78f7630e6c2e 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/EventSource.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/EventSource.cs
@@ -19,5 +19,11 @@ public static class EventSource
public const string Assessments = "Assessments";
public const string SubAssessments = "SubAssessments";
public const string Alerts = "Alerts";
+ public const string SecureScores = "SecureScores";
+ public const string SecureScoresSnapshot = "SecureScoresSnapshot";
+ public const string SecureScoreControls = "SecureScoreControls";
+ public const string SecureScoreControlsSnapshot = "SecureScoreControlsSnapshot";
+ public const string RegulatoryComplianceAssessment = "RegulatoryComplianceAssessment";
+ public const string RegulatoryComplianceAssessmentSnapshot = "RegulatoryComplianceAssessmentSnapshot";
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.cs
index 6391dffca8f2..119f870c19ad 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.cs
@@ -18,7 +18,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// sends information to an OMS workspace and whose data is displayed by
/// Azure Security Center.
///
- [Newtonsoft.Json.JsonObject("ExternalSecuritySolution")]
public partial class ExternalSecuritySolution
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.cs
index 940afb4c7ce2..d2d8d1166ae2 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of failed local logins is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("FailedLocalLoginsNotInAllowedRange")]
public partial class FailedLocalLoginsNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.cs
index b35c49246449..55109af42dc0 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of file uploads is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("FileUploadsNotInAllowedRange")]
public partial class FileUploadsNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.cs
index b4c92a0347b1..21b2e8bf7d9e 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of cloud to device messages (HTTP protocol) is not in allowed
/// range.
///
- [Newtonsoft.Json.JsonObject("HttpC2DMessagesNotInAllowedRange")]
public partial class HttpC2DMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.cs
index a9d06f027578..73f69e0b71b0 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of rejected cloud to device messages (HTTP protocol) is not in
/// allowed range.
///
- [Newtonsoft.Json.JsonObject("HttpC2DRejectedMessagesNotInAllowedRange")]
public partial class HttpC2DRejectedMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.cs
index d9ecd22c241b..820edd41c00a 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of device to cloud messages (HTTP protocol) is not in allowed
/// range.
///
- [Newtonsoft.Json.JsonObject("HttpD2CMessagesNotInAllowedRange")]
public partial class HttpD2CMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlert.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlert.cs
index 576c441f6737..6976cdba2dbb 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlert.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlert.cs
@@ -62,7 +62,7 @@ public IoTSecurityAggregatedAlert()
/// list of affected devices/alerts.
/// 10 devices with the highest number of
/// occurrences of this alert type, on this day.
- public IoTSecurityAggregatedAlert(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string alertType = default(string), string alertDisplayName = default(string), System.DateTime? aggregatedDateUtc = default(System.DateTime?), string vendorName = default(string), string reportedSeverity = default(string), string remediationSteps = default(string), string description = default(string), int? count = default(int?), string effectedResourceType = default(string), string systemSource = default(string), string actionTaken = default(string), string logAnalyticsQuery = default(string), IList topDevicesList = default(IList))
+ public IoTSecurityAggregatedAlert(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string alertType = default(string), string alertDisplayName = default(string), System.DateTime? aggregatedDateUtc = default(System.DateTime?), string vendorName = default(string), string reportedSeverity = default(string), string remediationSteps = default(string), string description = default(string), long? count = default(long?), string effectedResourceType = default(string), string systemSource = default(string), string actionTaken = default(string), string logAnalyticsQuery = default(string), IList topDevicesList = default(IList))
{
Id = id;
Name = name;
@@ -162,7 +162,7 @@ public IoTSecurityAggregatedAlert()
/// window.
///
[JsonProperty(PropertyName = "properties.count")]
- public int? Count { get; private set; }
+ public long? Count { get; private set; }
///
/// Gets azure resource ID of the resource that received the alerts.
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.cs
index fe7313395686..e99cf861e643 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedAlertPropertiesTopDevicesListItem.cs
@@ -33,7 +33,7 @@ public IoTSecurityAggregatedAlertPropertiesTopDevicesListItem()
/// device.
/// Most recent time this alert was raised
/// for this device, on this day.
- public IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(string deviceId = default(string), int? alertsCount = default(int?), string lastOccurrence = default(string))
+ public IoTSecurityAggregatedAlertPropertiesTopDevicesListItem(string deviceId = default(string), long? alertsCount = default(long?), string lastOccurrence = default(string))
{
DeviceId = deviceId;
AlertsCount = alertsCount;
@@ -56,7 +56,7 @@ public IoTSecurityAggregatedAlertPropertiesTopDevicesListItem()
/// Gets number of alerts raised for this device.
///
[JsonProperty(PropertyName = "alertsCount")]
- public int? AlertsCount { get; private set; }
+ public long? AlertsCount { get; private set; }
///
/// Gets most recent time this alert was raised for this device, on
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedRecommendation.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedRecommendation.cs
index 8a9bb666b275..10cb785cc6f8 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedRecommendation.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAggregatedRecommendation.cs
@@ -61,7 +61,7 @@ public IoTSecurityAggregatedRecommendation()
/// within the IoT Security solution.
/// Log analytics query for getting the
/// list of affected devices/alerts.
- public IoTSecurityAggregatedRecommendation(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string recommendationName = default(string), string recommendationDisplayName = default(string), string description = default(string), string recommendationTypeId = default(string), string detectedBy = default(string), string remediationSteps = default(string), string reportedSeverity = default(string), int? healthyDevices = default(int?), int? unhealthyDeviceCount = default(int?), string logAnalyticsQuery = default(string))
+ public IoTSecurityAggregatedRecommendation(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string recommendationName = default(string), string recommendationDisplayName = default(string), string description = default(string), string recommendationTypeId = default(string), string detectedBy = default(string), string remediationSteps = default(string), string reportedSeverity = default(string), long? healthyDevices = default(long?), long? unhealthyDeviceCount = default(long?), string logAnalyticsQuery = default(string))
{
Id = id;
Name = name;
@@ -156,13 +156,13 @@ public IoTSecurityAggregatedRecommendation()
/// Gets number of healthy devices within the IoT Security solution.
///
[JsonProperty(PropertyName = "properties.healthyDevices")]
- public int? HealthyDevices { get; private set; }
+ public long? HealthyDevices { get; private set; }
///
/// Gets number of unhealthy devices within the IoT Security solution.
///
[JsonProperty(PropertyName = "properties.unhealthyDeviceCount")]
- public int? UnhealthyDeviceCount { get; private set; }
+ public long? UnhealthyDeviceCount { get; private set; }
///
/// Gets log analytics query for getting the list of affected
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAlertedDevice.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAlertedDevice.cs
index c4a2dece5c37..370ea29693b8 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAlertedDevice.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityAlertedDevice.cs
@@ -33,7 +33,7 @@ public IoTSecurityAlertedDevice()
/// Device identifier.
/// Number of alerts raised for this
/// device.
- public IoTSecurityAlertedDevice(string deviceId = default(string), int? alertsCount = default(int?))
+ public IoTSecurityAlertedDevice(string deviceId = default(string), long? alertsCount = default(long?))
{
DeviceId = deviceId;
AlertsCount = alertsCount;
@@ -55,7 +55,7 @@ public IoTSecurityAlertedDevice()
/// Gets number of alerts raised for this device.
///
[JsonProperty(PropertyName = "alertsCount")]
- public int? AlertsCount { get; private set; }
+ public long? AlertsCount { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceAlert.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceAlert.cs
index 2a3591bb89da..fcc0b588b6c1 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceAlert.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceAlert.cs
@@ -35,7 +35,7 @@ public IoTSecurityDeviceAlert()
/// values include: 'Informational', 'Low', 'Medium', 'High'
/// Number of alerts raised for this alert
/// type.
- public IoTSecurityDeviceAlert(string alertDisplayName = default(string), string reportedSeverity = default(string), int? alertsCount = default(int?))
+ public IoTSecurityDeviceAlert(string alertDisplayName = default(string), string reportedSeverity = default(string), long? alertsCount = default(long?))
{
AlertDisplayName = alertDisplayName;
ReportedSeverity = reportedSeverity;
@@ -65,7 +65,7 @@ public IoTSecurityDeviceAlert()
/// Gets number of alerts raised for this alert type.
///
[JsonProperty(PropertyName = "alertsCount")]
- public int? AlertsCount { get; private set; }
+ public long? AlertsCount { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceRecommendation.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceRecommendation.cs
index fbafa0d2216d..273a5f40b9c5 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceRecommendation.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecurityDeviceRecommendation.cs
@@ -39,7 +39,7 @@ public IoTSecurityDeviceRecommendation()
/// 'High'
/// Number of devices with this
/// recommendation.
- public IoTSecurityDeviceRecommendation(string recommendationDisplayName = default(string), string reportedSeverity = default(string), int? devicesCount = default(int?))
+ public IoTSecurityDeviceRecommendation(string recommendationDisplayName = default(string), string reportedSeverity = default(string), long? devicesCount = default(long?))
{
RecommendationDisplayName = recommendationDisplayName;
ReportedSeverity = reportedSeverity;
@@ -69,7 +69,7 @@ public IoTSecurityDeviceRecommendation()
/// Gets number of devices with this recommendation.
///
[JsonProperty(PropertyName = "devicesCount")]
- public int? DevicesCount { get; private set; }
+ public long? DevicesCount { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionAnalyticsModel.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionAnalyticsModel.cs
index c9573fa848cd..d9b4829a9e80 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionAnalyticsModel.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionAnalyticsModel.cs
@@ -51,7 +51,7 @@ public IoTSecuritySolutionAnalyticsModel()
/// prevalent device alerts.
/// List of the 3 most
/// prevalent device recommendations.
- public IoTSecuritySolutionAnalyticsModel(string id = default(string), string name = default(string), string type = default(string), IoTSeverityMetrics metrics = default(IoTSeverityMetrics), int? unhealthyDeviceCount = default(int?), IList devicesMetrics = default(IList), IList topAlertedDevices = default(IList), IList mostPrevalentDeviceAlerts = default(IList), IList mostPrevalentDeviceRecommendations = default(IList))
+ public IoTSecuritySolutionAnalyticsModel(string id = default(string), string name = default(string), string type = default(string), IoTSeverityMetrics metrics = default(IoTSeverityMetrics), long? unhealthyDeviceCount = default(long?), IList devicesMetrics = default(IList), IList topAlertedDevices = default(IList), IList mostPrevalentDeviceAlerts = default(IList), IList mostPrevalentDeviceRecommendations = default(IList))
: base(id, name, type)
{
Metrics = metrics;
@@ -78,7 +78,7 @@ public IoTSecuritySolutionAnalyticsModel()
/// Gets number of unhealthy devices within your IoT Security solution.
///
[JsonProperty(PropertyName = "properties.unhealthyDeviceCount")]
- public int? UnhealthyDeviceCount { get; private set; }
+ public long? UnhealthyDeviceCount { get; private set; }
///
/// Gets list of device metrics by the aggregation date.
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionModel.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionModel.cs
index 30c128604d47..513d7a6b5754 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionModel.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSecuritySolutionModel.cs
@@ -53,7 +53,11 @@ public IoTSecuritySolutionModel()
/// solution.
/// Unmasked IP address logging
/// status. Possible values include: 'Disabled', 'Enabled'
- public IoTSecuritySolutionModel(string displayName, IList iotHubs, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), string workspace = default(string), string status = default(string), IList export = default(IList), IList disabledDataSources = default(IList), UserDefinedResourcesProperties userDefinedResources = default(UserDefinedResourcesProperties), IList autoDiscoveredResources = default(IList), IList recommendationsConfiguration = default(IList), string unmaskedIpLoggingStatus = default(string))
+ /// List of additional
+ /// workspaces
+ /// Azure Resource Manager metadata containing
+ /// createdBy and modifiedBy information.
+ public IoTSecuritySolutionModel(string displayName, IList iotHubs, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), string workspace = default(string), string status = default(string), IList export = default(IList), IList disabledDataSources = default(IList), UserDefinedResourcesProperties userDefinedResources = default(UserDefinedResourcesProperties), IList autoDiscoveredResources = default(IList), IList recommendationsConfiguration = default(IList), string unmaskedIpLoggingStatus = default(string), IList additionalWorkspaces = default(IList), SystemData systemData = default(SystemData))
{
Id = id;
Name = name;
@@ -70,6 +74,8 @@ public IoTSecuritySolutionModel()
AutoDiscoveredResources = autoDiscoveredResources;
RecommendationsConfiguration = recommendationsConfiguration;
UnmaskedIpLoggingStatus = unmaskedIpLoggingStatus;
+ AdditionalWorkspaces = additionalWorkspaces;
+ SystemData = systemData;
CustomInit();
}
@@ -171,6 +177,19 @@ public IoTSecuritySolutionModel()
[JsonProperty(PropertyName = "properties.unmaskedIpLoggingStatus")]
public string UnmaskedIpLoggingStatus { get; set; }
+ ///
+ /// Gets or sets list of additional workspaces
+ ///
+ [JsonProperty(PropertyName = "properties.additionalWorkspaces")]
+ public IList AdditionalWorkspaces { get; set; }
+
+ ///
+ /// Gets azure Resource Manager metadata containing createdBy and
+ /// modifiedBy information.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSeverityMetrics.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSeverityMetrics.cs
index 31723ada6abe..71fc0a7748c7 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSeverityMetrics.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IoTSeverityMetrics.cs
@@ -35,7 +35,7 @@ public IoTSeverityMetrics()
/// alerts/recommendations.
/// Count of low severity
/// alerts/recommendations.
- public IoTSeverityMetrics(int? high = default(int?), int? medium = default(int?), int? low = default(int?))
+ public IoTSeverityMetrics(long? high = default(long?), long? medium = default(long?), long? low = default(long?))
{
High = high;
Medium = medium;
@@ -52,19 +52,19 @@ public IoTSeverityMetrics()
/// Gets or sets count of high severity alerts/recommendations.
///
[JsonProperty(PropertyName = "high")]
- public int? High { get; set; }
+ public long? High { get; set; }
///
/// Gets or sets count of medium severity alerts/recommendations.
///
[JsonProperty(PropertyName = "medium")]
- public int? Medium { get; set; }
+ public long? Medium { get; set; }
///
/// Gets or sets count of low severity alerts/recommendations.
///
[JsonProperty(PropertyName = "low")]
- public int? Low { get; set; }
+ public long? Low { get; set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotAlert.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotAlert.cs
index 03e3833029c3..18edcb5188e2 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotAlert.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotAlert.cs
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.Management.Security.Models
/// IoT alert
///
[Rest.Serialization.JsonTransformation]
- public partial class IotAlert
+ public partial class IotAlert : Resource
{
///
/// Initializes a new instance of the IotAlert class.
@@ -34,6 +34,9 @@ public IotAlert()
///
/// Initializes a new instance of the IotAlert class.
///
+ /// Resource Id
+ /// Resource name
+ /// Resource type
/// Holds the product canonical identifier
/// of the alert within the scope of a product
/// Display name of the main entity
@@ -47,7 +50,8 @@ public IotAlert()
/// alert
/// A bag of fields which extends the
/// alert information
- public IotAlert(string systemAlertId = default(string), string compromisedEntity = default(string), string alertType = default(string), string startTimeUtc = default(string), string endTimeUtc = default(string), IList
[Rest.Serialization.JsonTransformation]
- public partial class IotAlertModel
+ public partial class IotAlertModel : Resource
{
///
/// Initializes a new instance of the IotAlertModel class.
@@ -34,6 +34,9 @@ public IotAlertModel()
///
/// Initializes a new instance of the IotAlertModel class.
///
+ /// Resource Id
+ /// Resource name
+ /// Resource type
/// Holds the product canonical identifier
/// of the alert within the scope of a product
/// Display name of the main entity
@@ -47,7 +50,8 @@ public IotAlertModel()
/// alert
/// A bag of fields which extends the
/// alert information
- public IotAlertModel(string systemAlertId = default(string), string compromisedEntity = default(string), string alertType = default(string), string startTimeUtc = default(string), string endTimeUtc = default(string), IList entities = default(IList), object extendedProperties = default(object))
+ public IotAlertModel(string id = default(string), string name = default(string), string type = default(string), string systemAlertId = default(string), string compromisedEntity = default(string), string alertType = default(string), string startTimeUtc = default(string), string endTimeUtc = default(string), IList entities = default(IList), object extendedProperties = default(object))
+ : base(id, name, type)
{
SystemAlertId = systemAlertId;
CompromisedEntity = compromisedEntity;
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsList.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsList.cs
index aac5bc83d934..f432097bf7e1 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsList.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsList.cs
@@ -32,7 +32,7 @@ public IotSensorsList()
/// Initializes a new instance of the IotSensorsList class.
///
/// List data
- public IotSensorsList(IList value = default(IList))
+ public IotSensorsList(IList value = default(IList))
{
Value = value;
CustomInit();
@@ -47,7 +47,7 @@ public IotSensorsList()
/// Gets list data
///
[JsonProperty(PropertyName = "value")]
- public IList Value { get; private set; }
+ public IList Value { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsModel.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsModel.cs
new file mode 100644
index 000000000000..307e27d17645
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSensorsModel.cs
@@ -0,0 +1,148 @@
+//
+// 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.Security.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// IoT sensor model
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class IotSensorsModel : Resource
+ {
+ ///
+ /// Initializes a new instance of the IotSensorsModel class.
+ ///
+ public IotSensorsModel()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the IotSensorsModel class.
+ ///
+ /// Resource Id
+ /// Resource name
+ /// Resource type
+ /// Last connectivity time of the IoT
+ /// sensor
+ /// Creation time of the IoT sensor
+ /// Dynamic mode status of the IoT
+ /// sensor
+ /// Learning mode status of the IoT
+ /// sensor
+ /// Status of the IoT sensor. Possible
+ /// values include: 'Ok', 'Disconnected', 'Unavailable'
+ /// Version of the IoT sensor
+ /// TI Automatic mode status of the
+ /// IoT sensor
+ /// TI Status of the IoT sensor. Possible values
+ /// include: 'Ok', 'Failed', 'InProgress', 'UpdateAvailable'
+ /// TI Version of the IoT sensor
+ /// Zone of the IoT sensor
+ /// Type of sensor. Possible values include:
+ /// 'Ot', 'Enterprise'
+ public IotSensorsModel(string id = default(string), string name = default(string), string type = default(string), string connectivityTime = default(string), string creationTime = default(string), bool? dynamicLearning = default(bool?), bool? learningMode = default(bool?), string sensorStatus = default(string), string sensorVersion = default(string), bool? tiAutomaticUpdates = default(bool?), string tiStatus = default(string), string tiVersion = default(string), string zone = default(string), string sensorType = default(string))
+ : base(id, name, type)
+ {
+ ConnectivityTime = connectivityTime;
+ CreationTime = creationTime;
+ DynamicLearning = dynamicLearning;
+ LearningMode = learningMode;
+ SensorStatus = sensorStatus;
+ SensorVersion = sensorVersion;
+ TiAutomaticUpdates = tiAutomaticUpdates;
+ TiStatus = tiStatus;
+ TiVersion = tiVersion;
+ Zone = zone;
+ SensorType = sensorType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets last connectivity time of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.connectivityTime")]
+ public string ConnectivityTime { get; private set; }
+
+ ///
+ /// Gets creation time of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.creationTime")]
+ public string CreationTime { get; private set; }
+
+ ///
+ /// Gets dynamic mode status of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.dynamicLearning")]
+ public bool? DynamicLearning { get; private set; }
+
+ ///
+ /// Gets learning mode status of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.learningMode")]
+ public bool? LearningMode { get; private set; }
+
+ ///
+ /// Gets status of the IoT sensor. Possible values include: 'Ok',
+ /// 'Disconnected', 'Unavailable'
+ ///
+ [JsonProperty(PropertyName = "properties.sensorStatus")]
+ public string SensorStatus { get; private set; }
+
+ ///
+ /// Gets version of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.sensorVersion")]
+ public string SensorVersion { get; private set; }
+
+ ///
+ /// Gets or sets TI Automatic mode status of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.tiAutomaticUpdates")]
+ public bool? TiAutomaticUpdates { get; set; }
+
+ ///
+ /// Gets TI Status of the IoT sensor. Possible values include: 'Ok',
+ /// 'Failed', 'InProgress', 'UpdateAvailable'
+ ///
+ [JsonProperty(PropertyName = "properties.tiStatus")]
+ public string TiStatus { get; private set; }
+
+ ///
+ /// Gets TI Version of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.tiVersion")]
+ public string TiVersion { get; private set; }
+
+ ///
+ /// Gets or sets zone of the IoT sensor
+ ///
+ [JsonProperty(PropertyName = "properties.zone")]
+ public string Zone { get; set; }
+
+ ///
+ /// Gets or sets type of sensor. Possible values include: 'Ot',
+ /// 'Enterprise'
+ ///
+ [JsonProperty(PropertyName = "properties.sensorType")]
+ public string SensorType { get; set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsThreatIntelligence.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSitesList.cs
similarity index 58%
rename from sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsThreatIntelligence.cs
rename to sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSitesList.cs
index 38058ad743fc..cfedc65bd774 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsThreatIntelligence.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSitesList.cs
@@ -11,30 +11,30 @@
namespace Microsoft.Azure.Management.Security.Models
{
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
- /// All downloads for threat intelligence
+ /// List of IoT sites
///
- public partial class PackageDownloadsThreatIntelligence
+ public partial class IotSitesList
{
///
- /// Initializes a new instance of the
- /// PackageDownloadsThreatIntelligence class.
+ /// Initializes a new instance of the IotSitesList class.
///
- public PackageDownloadsThreatIntelligence()
+ public IotSitesList()
{
CustomInit();
}
///
- /// Initializes a new instance of the
- /// PackageDownloadsThreatIntelligence class.
+ /// Initializes a new instance of the IotSitesList class.
///
- /// Download link
- public PackageDownloadsThreatIntelligence(string link = default(string))
+ /// List data
+ public IotSitesList(IList value = default(IList))
{
- Link = link;
+ Value = value;
CustomInit();
}
@@ -44,10 +44,10 @@ public PackageDownloadsThreatIntelligence()
partial void CustomInit();
///
- /// Gets or sets download link
+ /// Gets list data
///
- [JsonProperty(PropertyName = "link")]
- public string Link { get; set; }
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSitesModel.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSitesModel.cs
new file mode 100644
index 000000000000..dd4e63552255
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/IotSitesModel.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.Security.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// IoT site model
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class IotSitesModel : Resource
+ {
+ ///
+ /// Initializes a new instance of the IotSitesModel class.
+ ///
+ public IotSitesModel()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the IotSitesModel class.
+ ///
+ /// Display name of the IoT site
+ /// Resource Id
+ /// Resource name
+ /// Resource type
+ /// Tags of the IoT site
+ public IotSitesModel(string displayName, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
+ : base(id, name, type)
+ {
+ DisplayName = displayName;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets display name of the IoT site
+ ///
+ [JsonProperty(PropertyName = "properties.displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets tags of the IoT site
+ ///
+ [JsonProperty(PropertyName = "properties.tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (DisplayName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName");
+ }
+ }
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ListCustomAlertRule.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ListCustomAlertRule.cs
index 763959ad3860..528d183316de 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ListCustomAlertRule.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ListCustomAlertRule.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Security.Models
///
/// A List custom alert rule.
///
- [Newtonsoft.Json.JsonObject("ListCustomAlertRule")]
public partial class ListCustomAlertRule : CustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.cs
index 27e661e467c1..0005bd059e44 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -19,7 +18,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// Login by a local user that isn't allowed. Allow list consists of login
/// names to allow.
///
- [Newtonsoft.Json.JsonObject("LocalUserNotAllowed")]
public partial class LocalUserNotAllowed : AllowlistCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.cs
index 50ce5fe30a68..3df534833527 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of cloud to device messages (MQTT protocol) is not in allowed
/// range.
///
- [Newtonsoft.Json.JsonObject("MqttC2DMessagesNotInAllowedRange")]
public partial class MqttC2DMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.cs
index 55fb3039b11a..6607cb5285c9 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of rejected cloud to device messages (MQTT protocol) is not in
/// allowed range.
///
- [Newtonsoft.Json.JsonObject("MqttC2DRejectedMessagesNotInAllowedRange")]
public partial class MqttC2DRejectedMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.cs
index 358bb0c6e4f8..1bba936ed591 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of device to cloud messages (MQTT protocol) is not in allowed
/// range.
///
- [Newtonsoft.Json.JsonObject("MqttD2CMessagesNotInAllowedRange")]
public partial class MqttD2CMessagesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloads.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloads.cs
index fc5f9bb7fc97..a2c83f1cb017 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloads.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloads.cs
@@ -11,6 +11,8 @@
namespace Microsoft.Azure.Management.Security.Models
{
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
@@ -34,11 +36,21 @@ public PackageDownloads()
/// Manager
/// All downloads for threat
/// intelligence
- public PackageDownloads(PackageDownloadsSensor sensor = default(PackageDownloadsSensor), PackageDownloadsCentralManager centralManager = default(PackageDownloadsCentralManager), PackageDownloadsThreatIntelligence threatIntelligence = default(PackageDownloadsThreatIntelligence))
+ /// SNMP Server file
+ /// Used for local configuration export
+ /// Authorized devices
+ /// import template
+ /// Authorized
+ /// devices import template
+ public PackageDownloads(PackageDownloadsSensor sensor = default(PackageDownloadsSensor), PackageDownloadsCentralManager centralManager = default(PackageDownloadsCentralManager), IList threatIntelligence = default(IList), IList snmp = default(IList), IList wmiTool = default(IList), IList authorizedDevicesImportTemplate = default(IList), IList deviceInformationUpdateImportTemplate = default(IList))
{
Sensor = sensor;
CentralManager = centralManager;
ThreatIntelligence = threatIntelligence;
+ Snmp = snmp;
+ WmiTool = wmiTool;
+ AuthorizedDevicesImportTemplate = authorizedDevicesImportTemplate;
+ DeviceInformationUpdateImportTemplate = deviceInformationUpdateImportTemplate;
CustomInit();
}
@@ -63,7 +75,31 @@ public PackageDownloads()
/// Gets all downloads for threat intelligence
///
[JsonProperty(PropertyName = "threatIntelligence")]
- public PackageDownloadsThreatIntelligence ThreatIntelligence { get; private set; }
+ public IList ThreatIntelligence { get; private set; }
+
+ ///
+ /// Gets SNMP Server file
+ ///
+ [JsonProperty(PropertyName = "snmp")]
+ public IList Snmp { get; private set; }
+
+ ///
+ /// Gets used for local configuration export
+ ///
+ [JsonProperty(PropertyName = "wmiTool")]
+ public IList WmiTool { get; private set; }
+
+ ///
+ /// Gets authorized devices import template
+ ///
+ [JsonProperty(PropertyName = "authorizedDevicesImportTemplate")]
+ public IList AuthorizedDevicesImportTemplate { get; private set; }
+
+ ///
+ /// Gets authorized devices import template
+ ///
+ [JsonProperty(PropertyName = "deviceInformationUpdateImportTemplate")]
+ public IList DeviceInformationUpdateImportTemplate { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsCentralManager.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsCentralManager.cs
index f2172606f5e2..442c6c7b7aa8 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsCentralManager.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsCentralManager.cs
@@ -36,7 +36,7 @@ public PackageDownloadsCentralManager()
/// Contains full package downloads
/// Central Manager upgrade package downloads (on
/// existing installations)
- public PackageDownloadsCentralManager(PackageDownloadsCentralManagerFull full = default(PackageDownloadsCentralManagerFull), IList upgrade = default(IList))
+ public PackageDownloadsCentralManager(PackageDownloadsCentralManagerFull full = default(PackageDownloadsCentralManagerFull), IList upgrade = default(IList))
{
Full = full;
Upgrade = upgrade;
@@ -59,7 +59,7 @@ public PackageDownloadsCentralManager()
/// installations)
///
[JsonProperty(PropertyName = "upgrade")]
- public IList Upgrade { get; private set; }
+ public IList Upgrade { get; private set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsSensor.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsSensor.cs
index 06a65fb7899c..dd5b1b86174c 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsSensor.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/PackageDownloadsSensor.cs
@@ -34,7 +34,7 @@ public PackageDownloadsSensor()
/// Contains full package downloads
/// Sensor upgrade package downloads (on existing
/// installations)
- public PackageDownloadsSensor(PackageDownloadsSensorFull full = default(PackageDownloadsSensorFull), IList upgrade = default(IList))
+ public PackageDownloadsSensor(PackageDownloadsSensorFull full = default(PackageDownloadsSensorFull), IList upgrade = default(IList))
{
Full = full;
Upgrade = upgrade;
@@ -57,7 +57,7 @@ public PackageDownloadsSensor()
/// installations)
///
[JsonProperty(PropertyName = "upgrade")]
- public IList Upgrade { get; set; }
+ public IList Upgrade { get; set; }
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ProcessNotAllowed.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ProcessNotAllowed.cs
index 66e7dc1f46f9..a69d3dc5f932 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ProcessNotAllowed.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ProcessNotAllowed.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -19,7 +18,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// Execution of a process that isn't allowed. Allow list consists of
/// process names to allow.
///
- [Newtonsoft.Json.JsonObject("ProcessNotAllowed")]
public partial class ProcessNotAllowed : AllowlistCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.cs
index e7a506d93b60..6845776d0aed 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of device queue purges is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("QueuePurgesNotInAllowedRange")]
public partial class QueuePurgesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SettingResource.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResetPasswordInput.cs
similarity index 57%
rename from sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SettingResource.cs
rename to sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResetPasswordInput.cs
index 1f6f76dbf11a..c4f92216e4a0 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SettingResource.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResetPasswordInput.cs
@@ -14,28 +14,25 @@ namespace Microsoft.Azure.Management.Security.Models
using System.Linq;
///
- /// The kind of the security setting
+ /// Reset password input.
///
- [Newtonsoft.Json.JsonObject("SettingResource")]
- public partial class SettingResource : Resource
+ public partial class ResetPasswordInput
{
///
- /// Initializes a new instance of the SettingResource class.
+ /// Initializes a new instance of the ResetPasswordInput class.
///
- public SettingResource()
+ public ResetPasswordInput()
{
CustomInit();
}
///
- /// Initializes a new instance of the SettingResource class.
+ /// Initializes a new instance of the ResetPasswordInput class.
///
- /// Resource Id
- /// Resource name
- /// Resource type
- public SettingResource(string id = default(string), string name = default(string), string type = default(string))
- : base(id, name, type)
+ /// The appliance id of the sensor.
+ public ResetPasswordInput(string applianceId = default(string))
{
+ ApplianceId = applianceId;
CustomInit();
}
@@ -44,5 +41,11 @@ public SettingResource()
///
partial void CustomInit();
+ ///
+ /// Gets or sets the appliance id of the sensor.
+ ///
+ [JsonProperty(PropertyName = "applianceId")]
+ public string ApplianceId { get; set; }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceDetails.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceDetails.cs
index 6ab1d4f7544f..14c1aa733667 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceDetails.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceDetails.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Details of the resource that was assessed
///
- [Newtonsoft.Json.JsonObject("ResourceDetails")]
public partial class ResourceDetails
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceIdentifier.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceIdentifier.cs
index 261c4ea106f6..bc31b41d1edd 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceIdentifier.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ResourceIdentifier.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
@@ -18,7 +17,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// alert to the right product exposure group (tenant, workspace,
/// subscription etc.).
///
- [Newtonsoft.Json.JsonObject("ResourceIdentifier")]
public partial class ResourceIdentifier
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.cs
index 8692c1b52ee5..b00aa0b76545 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.cs
@@ -110,16 +110,13 @@ public virtual void Validate()
throw new ValidationException(ValidationRules.MaxLength, "Description", 256);
}
}
- if (MaxScore != null)
+ if (MaxScore > 10)
{
- if (MaxScore > 10)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxScore", 10);
- }
- if (MaxScore < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxScore", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxScore", 10);
+ }
+ if (MaxScore < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxScore", 0);
}
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.cs
index a85e38cb2ff4..731ad402ecdc 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.cs
@@ -135,37 +135,25 @@ public SecureScoreControlDetails()
///
public virtual void Validate()
{
- if (Max != null)
+ if (Max < 0)
{
- if (Max < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Max", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Max", 0);
}
- if (Current != null)
+ if (Current < 0)
{
- if (Current < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Current", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Current", 0);
}
- if (Percentage != null)
+ if (Percentage > 1)
{
- if (Percentage > 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 1);
- }
- if (Percentage < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 1);
}
- if (Weight != null)
+ if (Percentage < 0)
{
- if (Weight < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Weight", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0);
+ }
+ if (Weight < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Weight", 0);
}
if (Definition != null)
{
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlScore.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlScore.cs
index c13205cd0a70..0c5bcb1169af 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlScore.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreControlScore.cs
@@ -78,38 +78,29 @@ public SecureScoreControlScore()
///
public virtual void Validate()
{
- if (Max != null)
+ if (Max > 10)
{
- if (Max > 10)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Max", 10);
- }
- if (Max < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Max", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Max", 10);
}
- if (Current != null)
+ if (Max < 0)
{
- if (Current > 10)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Current", 10);
- }
- if (Current < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Current", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Max", 0);
}
- if (Percentage != null)
+ if (Current > 10)
{
- if (Percentage > 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 1);
- }
- if (Percentage < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Current", 10);
+ }
+ if (Current < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Current", 0);
+ }
+ if (Percentage > 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 1);
+ }
+ if (Percentage < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0);
}
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreItem.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreItem.cs
index aa0e2ba185d2..eef77dd1344f 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreItem.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SecureScoreItem.cs
@@ -99,37 +99,25 @@ public SecureScoreItem()
///
public virtual void Validate()
{
- if (Max != null)
+ if (Max < 0)
{
- if (Max < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Max", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Max", 0);
}
- if (Current != null)
+ if (Current < 0)
{
- if (Current < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Current", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Current", 0);
}
- if (Percentage != null)
+ if (Percentage > 1)
{
- if (Percentage > 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 1);
- }
- if (Percentage < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Percentage", 1);
}
- if (Weight != null)
+ if (Percentage < 0)
{
- if (Weight < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Weight", 0);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Percentage", 0);
+ }
+ if (Weight < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Weight", 0);
}
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SensorStatus.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SensorStatus.cs
new file mode 100644
index 000000000000..a104e1a8c5f8
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SensorStatus.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.Security.Models
+{
+
+ ///
+ /// Defines values for SensorStatus.
+ ///
+ public static class SensorStatus
+ {
+ public const string Ok = "Ok";
+ public const string Disconnected = "Disconnected";
+ public const string Unavailable = "Unavailable";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SensorType.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SensorType.cs
new file mode 100644
index 000000000000..bab65e800354
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SensorType.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.Security.Models
+{
+
+ ///
+ /// Defines values for SensorType.
+ ///
+ public static class SensorType
+ {
+ public const string Ot = "Ot";
+ public const string Enterprise = "Enterprise";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Setting.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Setting.cs
index 3d55e2d4a964..6b8f43e31e7d 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Setting.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/Setting.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
- /// Represents a security setting in Azure Security Center.
+ /// The kind of the security setting
///
- [Newtonsoft.Json.JsonObject("Setting")]
- public partial class Setting : SettingResource
+ public partial class Setting : Resource
{
///
/// Initializes a new instance of the Setting class.
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SystemData.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SystemData.cs
new file mode 100644
index 000000000000..07d83ce36f45
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/SystemData.cs
@@ -0,0 +1,103 @@
+//
+// 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.Security.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// The identity that created the
+ /// resource.
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC).
+ /// The identity that last modified the
+ /// resource.
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The timestamp of resource last
+ /// modification (UTC)
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identity that created the resource.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC).
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets the identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource last modification (UTC)
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.cs
index 7df8da76196b..47f1dfdf2e8f 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.cs
@@ -17,7 +17,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// A custom alert rule that checks if a value (depends on the custom alert
/// type) is within the given range.
///
- [Newtonsoft.Json.JsonObject("ThresholdCustomAlertRule")]
public partial class ThresholdCustomAlertRule : CustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TiStatus.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TiStatus.cs
new file mode 100644
index 000000000000..2a6295e5ffdc
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TiStatus.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.Security.Models
+{
+
+ ///
+ /// Defines values for TiStatus.
+ ///
+ public static class TiStatus
+ {
+ public const string Ok = "Ok";
+ public const string Failed = "Failed";
+ public const string InProgress = "InProgress";
+ public const string UpdateAvailable = "UpdateAvailable";
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.cs
index eaeb685da1b5..e6fdc3230f94 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.cs
@@ -17,7 +17,6 @@ namespace Microsoft.Azure.Management.Security.Models
/// A custom alert rule that checks if the number of activities (depends on
/// the custom alert type) in a time window is within the given range.
///
- [Newtonsoft.Json.JsonObject("TimeWindowCustomAlertRule")]
public partial class TimeWindowCustomAlertRule : ThresholdCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.cs
index e0b4415251e9..047ed484cb7e 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of twin updates is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("TwinUpdatesNotInAllowedRange")]
public partial class TwinUpdatesNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.cs
index f57c05fd4648..757b89fe6a5f 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Security.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Number of unauthorized operations is not in allowed range.
///
- [Newtonsoft.Json.JsonObject("UnauthorizedOperationsNotInAllowedRange")]
public partial class UnauthorizedOperationsNotInAllowedRange : TimeWindowCustomAlertRule
{
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UpgradePackageDownloadInfo.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UpgradePackageDownloadInfo.cs
new file mode 100644
index 000000000000..9751d1f752e7
--- /dev/null
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/Models/UpgradePackageDownloadInfo.cs
@@ -0,0 +1,56 @@
+//
+// 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.Security.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Information on a specific package upgrade download
+ ///
+ public partial class UpgradePackageDownloadInfo : PackageDownloadInfo
+ {
+ ///
+ /// Initializes a new instance of the UpgradePackageDownloadInfo class.
+ ///
+ public UpgradePackageDownloadInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the UpgradePackageDownloadInfo class.
+ ///
+ /// Version number
+ /// Download link
+ /// Kind of the version. Possible values
+ /// include: 'Latest', 'Previous', 'Preview'
+ /// Minimum base version for upgrade
+ public UpgradePackageDownloadInfo(string version = default(string), string link = default(string), string versionKind = default(string), string fromVersion = default(string))
+ : base(version, link, versionKind)
+ {
+ FromVersion = fromVersion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets minimum base version for upgrade
+ ///
+ [JsonProperty(PropertyName = "fromVersion")]
+ public string FromVersion { get; private set; }
+
+ }
+}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperations.cs
index 256212b665bc..71d998ed9f73 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperations.cs
@@ -986,5 +986,199 @@ internal OnPremiseIotSensorsOperations(SecurityCenterClient client)
return _result;
}
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// Name of the on-premise IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ ///
+ /// 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> DownloadResetPasswordWithHttpMessagesAsync(string onPremiseIotSensorName, string applianceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(Client.SubscriptionId, "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "Client.SubscriptionId", "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$");
+ }
+ }
+ if (onPremiseIotSensorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "onPremiseIotSensorName");
+ }
+ string apiVersion = "2020-08-06-preview";
+ ResetPasswordInput body = new ResetPasswordInput();
+ if (applianceId != null)
+ {
+ body.ApplianceId = applianceId;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("onPremiseIotSensorName", onPremiseIotSensorName);
+ tracingParameters.Add("body", body);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "DownloadResetPassword", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/onPremiseIotSensors/{onPremiseIotSensorName}/downloadResetPassword").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{onPremiseIotSensorName}", System.Uri.EscapeDataString(onPremiseIotSensorName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("POST");
+ _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;
+ if(body != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, 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)
+ {
+ 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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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)
+ {
+ _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperationsExtensions.cs
index 47615b98c03c..b078ef2c46b5 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/OnPremiseIotSensorsOperationsExtensions.cs
@@ -182,5 +182,44 @@ public static Stream DownloadActivation(this IOnPremiseIotSensorsOperations oper
return _result.Body;
}
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the on-premise IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ public static Stream DownloadResetPassword(this IOnPremiseIotSensorsOperations operations, string onPremiseIotSensorName, string applianceId = default(string))
+ {
+ return operations.DownloadResetPasswordAsync(onPremiseIotSensorName, applianceId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Download file for reset password of the sensor
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of the on-premise IoT sensor
+ ///
+ ///
+ /// The appliance id of the sensor.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DownloadResetPasswordAsync(this IOnPremiseIotSensorsOperations operations, string onPremiseIotSensorName, string applianceId = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var _result = await operations.DownloadResetPasswordWithHttpMessagesAsync(onPremiseIotSensorName, applianceId, null, cancellationToken).ConfigureAwait(false);
+ _result.Request.Dispose();
+ return _result.Body;
+ }
+
}
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/SdkInfo_SecurityCenter.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/SdkInfo_SecurityCenter.cs
index 19968c9a9ea6..08e2c7bf98a5 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/SdkInfo_SecurityCenter.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/SdkInfo_SecurityCenter.cs
@@ -22,7 +22,7 @@ public static IEnumerable> ApiInfo_SecurityCenter
new Tuple("Security", "AdaptiveApplicationControls", "2020-01-01"),
new Tuple("Security", "AdaptiveNetworkHardenings", "2020-01-01"),
new Tuple("Security", "AdvancedThreatProtection", "2019-01-01"),
- new Tuple("Security", "Alerts", "2020-01-01"),
+ new Tuple("Security", "Alerts", "2021-01-01"),
new Tuple("Security", "AlertsSuppressionRules", "2019-01-01-preview"),
new Tuple("Security", "AllowedConnections", "2020-01-01"),
new Tuple("Security", "Assessments", "2020-01-01"),
@@ -53,6 +53,7 @@ public static IEnumerable> ApiInfo_SecurityCenter
new Tuple("Security", "IotSecuritySolutionsAnalyticsAggregatedAlert", "2019-08-01"),
new Tuple("Security", "IotSecuritySolutionsAnalyticsRecommendation", "2019-08-01"),
new Tuple("Security", "IotSensors", "2020-08-06-preview"),
+ new Tuple("Security", "IotSites", "2020-08-06-preview"),
new Tuple("Security", "JitNetworkAccessPolicies", "2020-01-01"),
new Tuple