diff --git a/eng/mgmt/mgmtmetadata/security_resource-manager.txt b/eng/mgmt/mgmtmetadata/security_resource-manager.txt
index b032564b2676..a6926e7e6272 100644
--- a/eng/mgmt/mgmtmetadata/security_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/security_resource-manager.txt
@@ -3,13 +3,13 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/security/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\code\azure-sdk-for-net\sdk
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/security/resource-manager/readme.md --csharp --version=2.0.4421 --reflect-api-versions --csharp-sdks-folder=C:\code\azure-sdk-for-net\sdk
Autorest CSharp Version: 2.3.82
-2021-08-04 12:00:58 UTC
+2022-03-23 15:53:46 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
-Branch: master
-Commit: c981b81aa26ad4d0d156e034e6782853b4e747a1
+Branch: main
+Commit: bcec16b1ef77dc266ada0b3eb6d86eae0cdf3b16
AutoRest information
-Requested version: v2
+Requested version: 2.0.4421
Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperations.cs
index 524870971a85..d5dee93b4898 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperations.cs
@@ -252,6 +252,10 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
///
/// Gets an application control VM/server group.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
@@ -276,7 +280,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string groupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string ascLocation, string groupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -289,9 +293,9 @@ internal AdaptiveApplicationControlsOperations(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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (groupName == null)
{
@@ -305,6 +309,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("groupName", groupName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -314,7 +319,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -449,6 +454,10 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
///
/// Update an application control machine group
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
@@ -475,7 +484,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> PutWithHttpMessagesAsync(string groupName, AdaptiveApplicationControlGroup body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> PutWithHttpMessagesAsync(string ascLocation, string groupName, AdaptiveApplicationControlGroup body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -488,9 +497,9 @@ internal AdaptiveApplicationControlsOperations(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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (groupName == null)
{
@@ -508,6 +517,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("groupName", groupName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("body", body);
@@ -518,7 +528,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -659,6 +669,10 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
///
/// Delete an application control machine group
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
@@ -680,7 +694,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task DeleteWithHttpMessagesAsync(string groupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task DeleteWithHttpMessagesAsync(string ascLocation, string groupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -693,9 +707,9 @@ internal AdaptiveApplicationControlsOperations(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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (groupName == null)
{
@@ -709,6 +723,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("groupName", groupName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -718,7 +733,7 @@ internal AdaptiveApplicationControlsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName));
List _queryParameters = new List();
if (apiVersion != null)
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperationsExtensions.cs
index d43ddfb37085..713a88ea0ac1 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AdaptiveApplicationControlsOperationsExtensions.cs
@@ -67,12 +67,16 @@ public static partial class AdaptiveApplicationControlsOperationsExtensions
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
- public static AdaptiveApplicationControlGroup Get(this IAdaptiveApplicationControlsOperations operations, string groupName)
+ public static AdaptiveApplicationControlGroup Get(this IAdaptiveApplicationControlsOperations operations, string ascLocation, string groupName)
{
- return operations.GetAsync(groupName).GetAwaiter().GetResult();
+ return operations.GetAsync(ascLocation, groupName).GetAwaiter().GetResult();
}
///
@@ -81,15 +85,19 @@ public static AdaptiveApplicationControlGroup Get(this IAdaptiveApplicationContr
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IAdaptiveApplicationControlsOperations operations, string ascLocation, string groupName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(groupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(ascLocation, groupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -101,14 +109,18 @@ public static AdaptiveApplicationControlGroup Get(this IAdaptiveApplicationContr
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
///
///
- public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationControlsOperations operations, string groupName, AdaptiveApplicationControlGroup body)
+ public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationControlsOperations operations, string ascLocation, string groupName, AdaptiveApplicationControlGroup body)
{
- return operations.PutAsync(groupName, body).GetAwaiter().GetResult();
+ return operations.PutAsync(ascLocation, groupName, body).GetAwaiter().GetResult();
}
///
@@ -117,6 +129,10 @@ public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationContr
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
@@ -125,9 +141,9 @@ public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationContr
///
/// The cancellation token.
///
- public static async Task PutAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, AdaptiveApplicationControlGroup body, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task PutAsync(this IAdaptiveApplicationControlsOperations operations, string ascLocation, string groupName, AdaptiveApplicationControlGroup body, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.PutWithHttpMessagesAsync(groupName, body, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.PutWithHttpMessagesAsync(ascLocation, groupName, body, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -139,12 +155,16 @@ public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationContr
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
- public static void Delete(this IAdaptiveApplicationControlsOperations operations, string groupName)
+ public static void Delete(this IAdaptiveApplicationControlsOperations operations, string ascLocation, string groupName)
{
- operations.DeleteAsync(groupName).GetAwaiter().GetResult();
+ operations.DeleteAsync(ascLocation, groupName).GetAwaiter().GetResult();
}
///
@@ -153,15 +173,19 @@ public static void Delete(this IAdaptiveApplicationControlsOperations operations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of an application control machine group
///
///
/// The cancellation token.
///
- public static async Task DeleteAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteAsync(this IAdaptiveApplicationControlsOperations operations, string ascLocation, string groupName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.DeleteWithHttpMessagesAsync(groupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.DeleteWithHttpMessagesAsync(ascLocation, groupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
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 1bc78bd210d0..40cdcbf4616e 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 = "2021-01-01";
+ string apiVersion = "2021-11-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 = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -445,6 +445,10 @@ internal AlertsOperations(SecurityCenterClient client)
/// List all the alerts that are associated with the subscription that are
/// stored in a specific location
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Headers that will be added to request.
///
@@ -466,7 +470,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListSubscriptionLevelByRegionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListSubscriptionLevelByRegionWithHttpMessagesAsync(string ascLocation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -479,11 +483,11 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -492,6 +496,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListSubscriptionLevelByRegion", tracingParameters);
}
@@ -499,7 +504,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -634,6 +639,10 @@ internal AlertsOperations(SecurityCenterClient client)
/// List all the alerts that are associated with the resource group that are
/// stored in a specific location
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
@@ -659,7 +668,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListResourceGroupLevelByRegionWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListResourceGroupLevelByRegionWithHttpMessagesAsync(string ascLocation, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -672,9 +681,9 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (resourceGroupName == null)
{
@@ -695,7 +704,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -704,6 +713,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListResourceGroupLevelByRegion", tracingParameters);
@@ -712,7 +722,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -847,6 +857,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Get an alert that is associated with a subscription
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -871,7 +885,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetSubscriptionLevelWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetSubscriptionLevelWithHttpMessagesAsync(string ascLocation, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -884,15 +898,15 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -901,6 +915,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetSubscriptionLevel", tracingParameters);
@@ -909,7 +924,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -1045,6 +1060,10 @@ internal AlertsOperations(SecurityCenterClient client)
/// Get an alert that is associated a resource group or a resource in a
/// resource group
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -1073,7 +1092,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetResourceGroupLevelWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetResourceGroupLevelWithHttpMessagesAsync(string ascLocation, string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1086,9 +1105,9 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
@@ -1113,7 +1132,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1122,6 +1141,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -1131,7 +1151,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
List _queryParameters = new List();
@@ -1267,6 +1287,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Update the alert's state
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -1288,7 +1312,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(string ascLocation, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1301,15 +1325,15 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1318,6 +1342,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelStateToDismiss", tracingParameters);
@@ -1326,7 +1351,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -1443,6 +1468,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Update the alert's state
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -1464,7 +1493,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateSubscriptionLevelStateToResolveWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateSubscriptionLevelStateToResolveWithHttpMessagesAsync(string ascLocation, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1477,15 +1506,15 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1494,6 +1523,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelStateToResolve", tracingParameters);
@@ -1502,7 +1532,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -1619,6 +1649,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Update the alert's state
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -1640,7 +1674,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(string ascLocation, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1653,15 +1687,15 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1670,6 +1704,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "UpdateSubscriptionLevelStateToActivate", tracingParameters);
@@ -1678,7 +1713,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
List _queryParameters = new List();
if (apiVersion != null)
@@ -1795,6 +1830,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Update the alert's state
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -1820,7 +1859,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateResourceGroupLevelStateToResolveWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateResourceGroupLevelStateToResolveWithHttpMessagesAsync(string ascLocation, string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -1833,9 +1872,9 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
@@ -1860,7 +1899,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1869,6 +1908,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -1878,7 +1918,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
List _queryParameters = new List();
@@ -1996,6 +2036,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Update the alert's state
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -2021,7 +2065,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(string ascLocation, string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2034,9 +2078,9 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
@@ -2061,7 +2105,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2070,6 +2114,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -2079,7 +2124,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
List _queryParameters = new List();
@@ -2197,6 +2242,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Update the alert's state
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -2222,7 +2271,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(string ascLocation, string alertName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2235,9 +2284,9 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (alertName == null)
{
@@ -2262,7 +2311,7 @@ internal AlertsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2271,6 +2320,7 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertName", alertName);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -2280,7 +2330,7 @@ internal AlertsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/activate").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
List _queryParameters = new List();
@@ -2398,25 +2448,10 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// Simulate security alerts
///
- ///
- /// Alert Simulator request body data.
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
///
- ///
- /// 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.
///
@@ -2438,7 +2473,7 @@ internal AlertsOperations(SecurityCenterClient client)
///
/// 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))
+ public async Task SimulateWithHttpMessagesAsync(string ascLocation, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -2451,11 +2486,11 @@ 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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
- string apiVersion = "2021-01-01";
+ string apiVersion = "2021-11-01";
AlertSimulatorRequestBody alertSimulatorRequestBody = new AlertSimulatorRequestBody();
if (properties != null)
{
@@ -2469,15 +2504,16 @@ internal AlertsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("alertSimulatorRequestBody", alertSimulatorRequestBody);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginSimulate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Simulate", 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));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -2547,7 +2583,7 @@ internal AlertsOperations(SecurityCenterClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 202)
+ if ((int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
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 df7eed486658..4e0b5edaf6e1 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,13 @@ public static IPage ListByResourceGroup(this IAlertsOperations operations
///
/// The operations group for this extension method.
///
- public static IPage ListSubscriptionLevelByRegion(this IAlertsOperations operations)
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
+ public static IPage ListSubscriptionLevelByRegion(this IAlertsOperations operations, string ascLocation)
{
- return operations.ListSubscriptionLevelByRegionAsync().GetAwaiter().GetResult();
+ return operations.ListSubscriptionLevelByRegionAsync(ascLocation).GetAwaiter().GetResult();
}
///
@@ -104,12 +108,16 @@ public static IPage ListSubscriptionLevelByRegion(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The cancellation token.
///
- public static async Task> ListSubscriptionLevelByRegionAsync(this IAlertsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListSubscriptionLevelByRegionAsync(this IAlertsOperations operations, string ascLocation, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListSubscriptionLevelByRegionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListSubscriptionLevelByRegionWithHttpMessagesAsync(ascLocation, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -122,13 +130,17 @@ public static IPage ListSubscriptionLevelByRegion(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static IPage ListResourceGroupLevelByRegion(this IAlertsOperations operations, string resourceGroupName)
+ public static IPage ListResourceGroupLevelByRegion(this IAlertsOperations operations, string ascLocation, string resourceGroupName)
{
- return operations.ListResourceGroupLevelByRegionAsync(resourceGroupName).GetAwaiter().GetResult();
+ return operations.ListResourceGroupLevelByRegionAsync(ascLocation, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -138,6 +150,10 @@ public static IPage ListResourceGroupLevelByRegion(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
@@ -145,9 +161,9 @@ public static IPage ListResourceGroupLevelByRegion(this IAlertsOperations
///
/// The cancellation token.
///
- public static async Task> ListResourceGroupLevelByRegionAsync(this IAlertsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListResourceGroupLevelByRegionAsync(this IAlertsOperations operations, string ascLocation, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListResourceGroupLevelByRegionWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListResourceGroupLevelByRegionWithHttpMessagesAsync(ascLocation, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -159,12 +175,16 @@ public static IPage ListResourceGroupLevelByRegion(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
- public static Alert GetSubscriptionLevel(this IAlertsOperations operations, string alertName)
+ public static Alert GetSubscriptionLevel(this IAlertsOperations operations, string ascLocation, string alertName)
{
- return operations.GetSubscriptionLevelAsync(alertName).GetAwaiter().GetResult();
+ return operations.GetSubscriptionLevelAsync(ascLocation, alertName).GetAwaiter().GetResult();
}
///
@@ -173,15 +193,19 @@ public static Alert GetSubscriptionLevel(this IAlertsOperations operations, stri
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
///
/// The cancellation token.
///
- public static async Task GetSubscriptionLevelAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetSubscriptionLevelAsync(this IAlertsOperations operations, string ascLocation, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetSubscriptionLevelWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetSubscriptionLevelWithHttpMessagesAsync(ascLocation, alertName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -194,6 +218,10 @@ public static Alert GetSubscriptionLevel(this IAlertsOperations operations, stri
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -201,9 +229,9 @@ public static Alert GetSubscriptionLevel(this IAlertsOperations operations, stri
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static Alert GetResourceGroupLevel(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static Alert GetResourceGroupLevel(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName)
{
- return operations.GetResourceGroupLevelAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ return operations.GetResourceGroupLevelAsync(ascLocation, alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -213,6 +241,10 @@ public static Alert GetResourceGroupLevel(this IAlertsOperations operations, str
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -223,9 +255,9 @@ public static Alert GetResourceGroupLevel(this IAlertsOperations operations, str
///
/// The cancellation token.
///
- public static async Task GetResourceGroupLevelAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetResourceGroupLevelAsync(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetResourceGroupLevelWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetResourceGroupLevelWithHttpMessagesAsync(ascLocation, alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -237,12 +269,16 @@ public static Alert GetResourceGroupLevel(this IAlertsOperations operations, str
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
- public static void UpdateSubscriptionLevelStateToDismiss(this IAlertsOperations operations, string alertName)
+ public static void UpdateSubscriptionLevelStateToDismiss(this IAlertsOperations operations, string ascLocation, string alertName)
{
- operations.UpdateSubscriptionLevelStateToDismissAsync(alertName).GetAwaiter().GetResult();
+ operations.UpdateSubscriptionLevelStateToDismissAsync(ascLocation, alertName).GetAwaiter().GetResult();
}
///
@@ -251,15 +287,19 @@ public static void UpdateSubscriptionLevelStateToDismiss(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
///
/// The cancellation token.
///
- public static async Task UpdateSubscriptionLevelStateToDismissAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateSubscriptionLevelStateToDismissAsync(this IAlertsOperations operations, string ascLocation, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateSubscriptionLevelStateToDismissWithHttpMessagesAsync(ascLocation, alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -268,12 +308,16 @@ public static void UpdateSubscriptionLevelStateToDismiss(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
- public static void UpdateSubscriptionLevelStateToResolve(this IAlertsOperations operations, string alertName)
+ public static void UpdateSubscriptionLevelStateToResolve(this IAlertsOperations operations, string ascLocation, string alertName)
{
- operations.UpdateSubscriptionLevelStateToResolveAsync(alertName).GetAwaiter().GetResult();
+ operations.UpdateSubscriptionLevelStateToResolveAsync(ascLocation, alertName).GetAwaiter().GetResult();
}
///
@@ -282,15 +326,19 @@ public static void UpdateSubscriptionLevelStateToResolve(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
///
/// The cancellation token.
///
- public static async Task UpdateSubscriptionLevelStateToResolveAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateSubscriptionLevelStateToResolveAsync(this IAlertsOperations operations, string ascLocation, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateSubscriptionLevelStateToResolveWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateSubscriptionLevelStateToResolveWithHttpMessagesAsync(ascLocation, alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -299,12 +347,16 @@ public static void UpdateSubscriptionLevelStateToResolve(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
- public static void UpdateSubscriptionLevelStateToActivate(this IAlertsOperations operations, string alertName)
+ public static void UpdateSubscriptionLevelStateToActivate(this IAlertsOperations operations, string ascLocation, string alertName)
{
- operations.UpdateSubscriptionLevelStateToActivateAsync(alertName).GetAwaiter().GetResult();
+ operations.UpdateSubscriptionLevelStateToActivateAsync(ascLocation, alertName).GetAwaiter().GetResult();
}
///
@@ -313,15 +365,19 @@ public static void UpdateSubscriptionLevelStateToActivate(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
///
/// The cancellation token.
///
- public static async Task UpdateSubscriptionLevelStateToActivateAsync(this IAlertsOperations operations, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateSubscriptionLevelStateToActivateAsync(this IAlertsOperations operations, string ascLocation, string alertName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateSubscriptionLevelStateToActivateWithHttpMessagesAsync(ascLocation, alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -330,6 +386,10 @@ public static void UpdateSubscriptionLevelStateToActivate(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -337,9 +397,9 @@ public static void UpdateSubscriptionLevelStateToActivate(this IAlertsOperations
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static void UpdateResourceGroupLevelStateToResolve(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static void UpdateResourceGroupLevelStateToResolve(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName)
{
- operations.UpdateResourceGroupLevelStateToResolveAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ operations.UpdateResourceGroupLevelStateToResolveAsync(ascLocation, alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -348,6 +408,10 @@ public static void UpdateResourceGroupLevelStateToResolve(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -358,9 +422,9 @@ public static void UpdateResourceGroupLevelStateToResolve(this IAlertsOperations
///
/// The cancellation token.
///
- public static async Task UpdateResourceGroupLevelStateToResolveAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateResourceGroupLevelStateToResolveAsync(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateResourceGroupLevelStateToResolveWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateResourceGroupLevelStateToResolveWithHttpMessagesAsync(ascLocation, alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -369,6 +433,10 @@ public static void UpdateResourceGroupLevelStateToResolve(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -376,9 +444,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 UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static void UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName)
{
- operations.UpdateResourceGroupLevelStateToDismissAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ operations.UpdateResourceGroupLevelStateToDismissAsync(ascLocation, alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -387,6 +455,10 @@ public static void UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -397,9 +469,9 @@ public static void UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations
///
/// The cancellation token.
///
- public static async Task UpdateResourceGroupLevelStateToDismissAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateResourceGroupLevelStateToDismissAsync(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateResourceGroupLevelStateToDismissWithHttpMessagesAsync(ascLocation, alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -408,6 +480,10 @@ public static void UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -415,9 +491,9 @@ public static void UpdateResourceGroupLevelStateToDismiss(this IAlertsOperations
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
- public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperations operations, string alertName, string resourceGroupName)
+ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName)
{
- operations.UpdateResourceGroupLevelStateToActivateAsync(alertName, resourceGroupName).GetAwaiter().GetResult();
+ operations.UpdateResourceGroupLevelStateToActivateAsync(ascLocation, alertName, resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -426,6 +502,10 @@ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperation
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Name of the alert object
///
@@ -436,9 +516,9 @@ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperation
///
/// The cancellation token.
///
- public static async Task UpdateResourceGroupLevelStateToActivateAsync(this IAlertsOperations operations, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateResourceGroupLevelStateToActivateAsync(this IAlertsOperations operations, string ascLocation, string alertName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.UpdateResourceGroupLevelStateToActivateWithHttpMessagesAsync(ascLocation, alertName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -447,29 +527,16 @@ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperation
///
/// 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.
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
///
///
/// Alert Simulator request body data.
///
- ///
- /// The cancellation token.
- ///
- public static async Task SimulateAsync(this IAlertsOperations operations, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), CancellationToken cancellationToken = default(CancellationToken))
+ public static void Simulate(this IAlertsOperations operations, string ascLocation, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties))
{
- (await operations.SimulateWithHttpMessagesAsync(properties, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ operations.SimulateAsync(ascLocation, properties).GetAwaiter().GetResult();
}
///
@@ -478,19 +545,9 @@ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperation
///
/// 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.
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
///
///
/// Alert Simulator request body data.
@@ -498,9 +555,9 @@ public static void UpdateResourceGroupLevelStateToActivate(this IAlertsOperation
///
/// The cancellation token.
///
- public static async Task BeginSimulateAsync(this IAlertsOperations operations, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task SimulateAsync(this IAlertsOperations operations, string ascLocation, AlertSimulatorRequestProperties properties = default(AlertSimulatorRequestProperties), CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.BeginSimulateWithHttpMessagesAsync(properties, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.SimulateWithHttpMessagesAsync(ascLocation, properties, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperations.cs
index 683054249d40..fde848f700af 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperations.cs
@@ -238,6 +238,10 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
/// Gets the list of all possible traffic between resources for the
/// subscription and location.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// Headers that will be added to request.
///
@@ -259,7 +263,7 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListByHomeRegionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListByHomeRegionWithHttpMessagesAsync(string ascLocation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -272,9 +276,9 @@ internal AllowedConnectionsOperations(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}$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
string apiVersion = "2020-01-01";
// Tracing
@@ -284,6 +288,7 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListByHomeRegion", tracingParameters);
@@ -292,7 +297,7 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
List _queryParameters = new List();
if (apiVersion != null)
{
@@ -431,6 +436,10 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The type of allowed connections (Internal, External). Possible values
/// include: 'Internal', 'External'
@@ -456,7 +465,7 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string connectionType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string ascLocation, string connectionType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -488,9 +497,9 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
- if (Client.AscLocation == null)
+ if (ascLocation == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.AscLocation");
+ throw new ValidationException(ValidationRules.CannotBeNull, "ascLocation");
}
if (connectionType == null)
{
@@ -505,6 +514,7 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("ascLocation", ascLocation);
tracingParameters.Add("connectionType", connectionType);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -515,7 +525,7 @@ internal AllowedConnectionsOperations(SecurityCenterClient client)
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(Client.AscLocation));
+ _url = _url.Replace("{ascLocation}", System.Uri.EscapeDataString(ascLocation));
_url = _url.Replace("{connectionType}", System.Uri.EscapeDataString(connectionType));
List _queryParameters = new List();
if (apiVersion != null)
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperationsExtensions.cs
index e28c1214a53d..a2d482642958 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AllowedConnectionsOperationsExtensions.cs
@@ -58,9 +58,13 @@ public static IPage List(this IAllowedConnectionsOpe
///
/// The operations group for this extension method.
///
- public static IPage ListByHomeRegion(this IAllowedConnectionsOperations operations)
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
+ public static IPage ListByHomeRegion(this IAllowedConnectionsOperations operations, string ascLocation)
{
- return operations.ListByHomeRegionAsync().GetAwaiter().GetResult();
+ return operations.ListByHomeRegionAsync(ascLocation).GetAwaiter().GetResult();
}
///
@@ -70,12 +74,16 @@ public static IPage ListByHomeRegion(this IAllowedCo
///
/// The operations group for this extension method.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The cancellation token.
///
- public static async Task> ListByHomeRegionAsync(this IAllowedConnectionsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListByHomeRegionAsync(this IAllowedConnectionsOperations operations, string ascLocation, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByHomeRegionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByHomeRegionWithHttpMessagesAsync(ascLocation, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -92,13 +100,17 @@ public static IPage ListByHomeRegion(this IAllowedCo
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The type of allowed connections (Internal, External). Possible values
/// include: 'Internal', 'External'
///
- public static AllowedConnectionsResource Get(this IAllowedConnectionsOperations operations, string resourceGroupName, string connectionType)
+ public static AllowedConnectionsResource Get(this IAllowedConnectionsOperations operations, string resourceGroupName, string ascLocation, string connectionType)
{
- return operations.GetAsync(resourceGroupName, connectionType).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, ascLocation, connectionType).GetAwaiter().GetResult();
}
///
@@ -112,6 +124,10 @@ public static AllowedConnectionsResource Get(this IAllowedConnectionsOperations
/// The name of the resource group within the user's subscription. The name is
/// case insensitive.
///
+ ///
+ /// The location where ASC stores the data of the subscription. can be
+ /// retrieved from Get locations
+ ///
///
/// The type of allowed connections (Internal, External). Possible values
/// include: 'Internal', 'External'
@@ -119,9 +135,9 @@ public static AllowedConnectionsResource Get(this IAllowedConnectionsOperations
///
/// The cancellation token.
///
- public static async Task GetAsync(this IAllowedConnectionsOperations operations, string resourceGroupName, string connectionType, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IAllowedConnectionsOperations operations, string resourceGroupName, string ascLocation, string connectionType, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, connectionType, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, ascLocation, connectionType, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperations.cs
index b757fa445559..6b11d7dceecc 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperations.cs
@@ -68,9 +68,9 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -183,7 +183,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -196,7 +196,7 @@ internal AssessmentsMetadataOperations(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)
{
@@ -242,13 +242,13 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string assessmentMetadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string assessmentMetadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (assessmentMetadataName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "assessmentMetadataName");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -363,7 +363,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -376,7 +376,7 @@ internal AssessmentsMetadataOperations(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)
{
@@ -419,7 +419,7 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -432,7 +432,7 @@ internal AssessmentsMetadataOperations(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-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -546,7 +546,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -559,7 +559,7 @@ internal AssessmentsMetadataOperations(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)
{
@@ -605,7 +605,7 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetInSubscriptionWithHttpMessagesAsync(string assessmentMetadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetInSubscriptionWithHttpMessagesAsync(string assessmentMetadataName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (assessmentMetadataName == null)
{
@@ -622,7 +622,7 @@ internal AssessmentsMetadataOperations(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-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -738,7 +738,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -751,7 +751,7 @@ internal AssessmentsMetadataOperations(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)
{
@@ -801,7 +801,7 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CreateInSubscriptionWithHttpMessagesAsync(string assessmentMetadataName, SecurityAssessmentMetadata assessmentMetadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> CreateInSubscriptionWithHttpMessagesAsync(string assessmentMetadataName, SecurityAssessmentMetadataResponse assessmentMetadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (assessmentMetadataName == null)
{
@@ -826,7 +826,7 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
{
assessmentMetadata.Validate();
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -949,7 +949,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -962,7 +962,7 @@ internal AssessmentsMetadataOperations(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)
{
@@ -1024,7 +1024,7 @@ internal AssessmentsMetadataOperations(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-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1181,7 +1181,7 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -1295,7 +1295,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -1308,7 +1308,7 @@ internal AssessmentsMetadataOperations(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)
{
@@ -1354,7 +1354,7 @@ internal AssessmentsMetadataOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -1468,7 +1468,7 @@ internal AssessmentsMetadataOperations(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"))
@@ -1481,7 +1481,7 @@ internal AssessmentsMetadataOperations(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)
{
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperationsExtensions.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperationsExtensions.cs
index 107d2e3b56ae..9170cabf9e6d 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperationsExtensions.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsMetadataOperationsExtensions.cs
@@ -27,7 +27,7 @@ public static partial class AssessmentsMetadataOperationsExtensions
///
/// The operations group for this extension method.
///
- public static IPage List(this IAssessmentsMetadataOperations operations)
+ public static IPage List(this IAssessmentsMetadataOperations operations)
{
return operations.ListAsync().GetAwaiter().GetResult();
}
@@ -41,7 +41,7 @@ public static IPage List(this IAssessmentsMetadataOp
///
/// The cancellation token.
///
- public static async Task> ListAsync(this IAssessmentsMetadataOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListAsync(this IAssessmentsMetadataOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
@@ -58,7 +58,7 @@ public static IPage List(this IAssessmentsMetadataOp
///
/// The Assessment Key - Unique key for the assessment type
///
- public static SecurityAssessmentMetadata Get(this IAssessmentsMetadataOperations operations, string assessmentMetadataName)
+ public static SecurityAssessmentMetadataResponse Get(this IAssessmentsMetadataOperations operations, string assessmentMetadataName)
{
return operations.GetAsync(assessmentMetadataName).GetAwaiter().GetResult();
}
@@ -75,7 +75,7 @@ public static SecurityAssessmentMetadata Get(this IAssessmentsMetadataOperations
///
/// The cancellation token.
///
- public static async Task GetAsync(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(assessmentMetadataName, null, cancellationToken).ConfigureAwait(false))
{
@@ -89,7 +89,7 @@ public static SecurityAssessmentMetadata Get(this IAssessmentsMetadataOperations
///
/// The operations group for this extension method.
///
- public static IPage ListBySubscription(this IAssessmentsMetadataOperations operations)
+ public static IPage ListBySubscription(this IAssessmentsMetadataOperations operations)
{
return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
}
@@ -103,7 +103,7 @@ public static IPage ListBySubscription(this IAssessm
///
/// The cancellation token.
///
- public static async Task> ListBySubscriptionAsync(this IAssessmentsMetadataOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListBySubscriptionAsync(this IAssessmentsMetadataOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
@@ -120,7 +120,7 @@ public static IPage ListBySubscription(this IAssessm
///
/// The Assessment Key - Unique key for the assessment type
///
- public static SecurityAssessmentMetadata GetInSubscription(this IAssessmentsMetadataOperations operations, string assessmentMetadataName)
+ public static SecurityAssessmentMetadataResponse GetInSubscription(this IAssessmentsMetadataOperations operations, string assessmentMetadataName)
{
return operations.GetInSubscriptionAsync(assessmentMetadataName).GetAwaiter().GetResult();
}
@@ -137,7 +137,7 @@ public static SecurityAssessmentMetadata GetInSubscription(this IAssessmentsMeta
///
/// The cancellation token.
///
- public static async Task GetInSubscriptionAsync(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetInSubscriptionAsync(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetInSubscriptionWithHttpMessagesAsync(assessmentMetadataName, null, cancellationToken).ConfigureAwait(false))
{
@@ -158,7 +158,7 @@ public static SecurityAssessmentMetadata GetInSubscription(this IAssessmentsMeta
///
/// AssessmentMetadata object
///
- public static SecurityAssessmentMetadata CreateInSubscription(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, SecurityAssessmentMetadata assessmentMetadata)
+ public static SecurityAssessmentMetadataResponse CreateInSubscription(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, SecurityAssessmentMetadataResponse assessmentMetadata)
{
return operations.CreateInSubscriptionAsync(assessmentMetadataName, assessmentMetadata).GetAwaiter().GetResult();
}
@@ -179,7 +179,7 @@ public static SecurityAssessmentMetadata CreateInSubscription(this IAssessmentsM
///
/// The cancellation token.
///
- public static async Task CreateInSubscriptionAsync(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, SecurityAssessmentMetadata assessmentMetadata, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task CreateInSubscriptionAsync(this IAssessmentsMetadataOperations operations, string assessmentMetadataName, SecurityAssessmentMetadataResponse assessmentMetadata, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateInSubscriptionWithHttpMessagesAsync(assessmentMetadataName, assessmentMetadata, null, cancellationToken).ConfigureAwait(false))
{
@@ -231,7 +231,7 @@ public static void DeleteInSubscription(this IAssessmentsMetadataOperations oper
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage ListNext(this IAssessmentsMetadataOperations operations, string nextPageLink)
+ public static IPage ListNext(this IAssessmentsMetadataOperations operations, string nextPageLink)
{
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}
@@ -248,7 +248,7 @@ public static IPage ListNext(this IAssessmentsMetada
///
/// The cancellation token.
///
- public static async Task> ListNextAsync(this IAssessmentsMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListNextAsync(this IAssessmentsMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
@@ -265,7 +265,7 @@ public static IPage ListNext(this IAssessmentsMetada
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage ListBySubscriptionNext(this IAssessmentsMetadataOperations operations, string nextPageLink)
+ public static IPage ListBySubscriptionNext(this IAssessmentsMetadataOperations operations, string nextPageLink)
{
return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
}
@@ -282,7 +282,7 @@ public static IPage ListBySubscriptionNext(this IAss
///
/// The cancellation token.
///
- public static async Task> ListBySubscriptionNextAsync(this IAssessmentsMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListBySubscriptionNextAsync(this IAssessmentsMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
diff --git a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsOperations.cs b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsOperations.cs
index 1c5f938d1b19..a5585a960fc8 100644
--- a/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsOperations.cs
+++ b/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/src/Generated/AssessmentsOperations.cs
@@ -79,13 +79,13 @@ internal AssessmentsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListWithHttpMessagesAsync(string scope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ 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-01-01";
+ string apiVersion = "2021-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -200,7 +200,7 @@ internal AssessmentsOperations(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"))
@@ -213,7 +213,7 @@ internal AssessmentsOperations(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)
{
@@ -265,7 +265,7 @@ internal AssessmentsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceId, string assessmentName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceId, string assessmentName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceId == null)
{
@@ -275,7 +275,7 @@ internal AssessmentsOperations(SecurityCenterClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "assessmentName");
}
- string apiVersion = "2020-01-01";
+ string apiVersion = "2021-06-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -397,7 +397,7 @@ internal AssessmentsOperations(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"))
@@ -410,7 +410,7 @@ internal AssessmentsOperations(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)
{
@@ -464,7 +464,7 @@ internal AssessmentsOperations(SecurityCenterClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceId, string assessmentName, SecurityAssessment assessment, Dictionary