diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperations.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperations.cs
index bd01e591d863..8fdd43acc35f 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperations.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperations.cs
@@ -123,7 +123,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -355,7 +355,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -559,7 +559,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -756,7 +756,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupPatch");
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -927,6 +927,28 @@ internal ActionGroupsOperations(MonitorManagementClient client)
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, NotificationRequestBody notificationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginCreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, notificationRequest, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Get the test notifications by the notification id
///
@@ -971,7 +993,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "notificationId");
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1114,6 +1136,213 @@ internal ActionGroupsOperations(MonitorManagementClient client)
return _result;
}
+ ///
+ /// Get the test notifications by the notification id
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification id
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetTestNotificationsAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, string notificationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (notificationId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "notificationId");
+ }
+ string apiVersion = "2022-04-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("notificationId", notificationId);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetTestNotificationsAtResourceGroupLevel", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/notificationStatus/{notificationId}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{notificationId}", System.Uri.EscapeDataString(notificationId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Get a list of all action groups in a subscription.
///
@@ -1151,7 +1380,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1347,7 +1576,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1558,7 +1787,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "receiverName");
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
EnableRequest enableRequest = new EnableRequest();
if (receiverName != null)
{
@@ -1745,7 +1974,7 @@ internal ActionGroupsOperations(MonitorManagementClient client)
{
notificationRequest.Validate();
}
- string apiVersion = "2021-09-01";
+ string apiVersion = "2022-04-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1893,5 +2122,221 @@ internal ActionGroupsOperations(MonitorManagementClient client)
return _result;
}
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, NotificationRequestBody notificationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (notificationRequest == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "notificationRequest");
+ }
+ if (notificationRequest != null)
+ {
+ notificationRequest.Validate();
+ }
+ string apiVersion = "2022-04-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("notificationRequest", notificationRequest);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateNotificationsAtResourceGroupLevel", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(notificationRequest != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(notificationRequest, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperationsExtensions.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperationsExtensions.cs
index e421b008733a..0260afb4e48c 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperationsExtensions.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/ActionGroupsOperationsExtensions.cs
@@ -228,6 +228,46 @@ public static TestNotificationResponse PostTestNotifications(this IActionGroupsO
}
}
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ public static TestNotificationResponse CreateNotificationsAtResourceGroupLevel(this IActionGroupsOperations operations, string resourceGroupName, NotificationRequestBody notificationRequest)
+ {
+ return operations.CreateNotificationsAtResourceGroupLevelAsync(resourceGroupName, notificationRequest).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateNotificationsAtResourceGroupLevelAsync(this IActionGroupsOperations operations, string resourceGroupName, NotificationRequestBody notificationRequest, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, notificationRequest, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Get the test notifications by the notification id
///
@@ -262,6 +302,46 @@ public static TestNotificationDetailsResponse GetTestNotifications(this IActionG
}
}
+ ///
+ /// Get the test notifications by the notification id
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification id
+ ///
+ public static TestNotificationDetailsResponse GetTestNotificationsAtResourceGroupLevel(this IActionGroupsOperations operations, string resourceGroupName, string notificationId)
+ {
+ return operations.GetTestNotificationsAtResourceGroupLevelAsync(resourceGroupName, notificationId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the test notifications by the notification id
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification id
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetTestNotificationsAtResourceGroupLevelAsync(this IActionGroupsOperations operations, string resourceGroupName, string notificationId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetTestNotificationsAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, notificationId, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Get a list of all action groups in a subscription.
///
@@ -405,5 +485,45 @@ public static TestNotificationResponse BeginPostTestNotifications(this IActionGr
}
}
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ public static TestNotificationResponse BeginCreateNotificationsAtResourceGroupLevel(this IActionGroupsOperations operations, string resourceGroupName, NotificationRequestBody notificationRequest)
+ {
+ return operations.BeginCreateNotificationsAtResourceGroupLevelAsync(resourceGroupName, notificationRequest).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateNotificationsAtResourceGroupLevelAsync(this IActionGroupsOperations operations, string resourceGroupName, NotificationRequestBody notificationRequest, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, notificationRequest, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/IActionGroupsOperations.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/IActionGroupsOperations.cs
index b27e9f08b702..6a81428e9d68 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/IActionGroupsOperations.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/IActionGroupsOperations.cs
@@ -150,6 +150,31 @@ public partial interface IActionGroupsOperations
///
Task> PostTestNotificationsWithHttpMessagesAsync(NotificationRequestBody notificationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, NotificationRequestBody notificationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Get the test notifications by the notification id
///
///
@@ -172,6 +197,31 @@ public partial interface IActionGroupsOperations
///
Task> GetTestNotificationsWithHttpMessagesAsync(string notificationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Get the test notifications by the notification id
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification id
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetTestNotificationsAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, string notificationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Get a list of all action groups in a subscription.
///
///
@@ -261,5 +311,30 @@ public partial interface IActionGroupsOperations
/// Thrown when a required parameter is null
///
Task> BeginPostTestNotificationsWithHttpMessagesAsync(NotificationRequestBody notificationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Send test notifications to a set of provided receivers
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The notification request body which includes the contact details
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateNotificationsAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, NotificationRequestBody notificationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs
index b9315baf97de..cf4c8044adf1 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs
@@ -19,7 +19,7 @@ public static IEnumerable> ApiInfo_MonitorClient
{
return new Tuple[]
{
- new Tuple("Insights", "ActionGroups", "2021-09-01"),
+ new Tuple("Insights", "ActionGroups", "2022-04-01"),
new Tuple("Insights", "ActivityLogAlerts", "2020-10-01"),
new Tuple("Insights", "ActivityLogs", "2015-04-01"),
new Tuple("Insights", "AlertRules", "2016-03-01"),
@@ -50,16 +50,5 @@ public static IEnumerable> ApiInfo_MonitorClient
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "2.0.4421";
- public static readonly String AutoRestBootStrapperVersion = "autorest@3.5.1";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/readme.md --csharp --version=2.0.4421 --reflect-api-versions --tag=package-2022-02 --csharp-sdks-folder=C:\\Repos\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "main";
- public static readonly String GithubCommidId = "5e638554b6284a41ef1918ef5d700f70ec338799";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-