Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0559fe1
Merging AutoRest branch changes to issue a pull request from vs17Dev …
gucalder Apr 17, 2017
4e31b86
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 18, 2017
c5c1893
Fixing version of Newtonsoft.Json
gucalder Apr 20, 2017
e70107e
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 20, 2017
a7c7afa
Adding some unit tests and making sure the Tests project works.
gucalder Apr 20, 2017
ca7071b
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 20, 2017
b3d3060
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 21, 2017
43f1ddc
Adding some items to the proj file
gucalder Apr 21, 2017
9a86955
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 21, 2017
83e227b
Commenting imports in the project file
gucalder Apr 21, 2017
7c5fac0
Changing class namespace of the generated code
gucalder Apr 25, 2017
38ce61e
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 25, 2017
bccf4ae
Changing namespace and assembly name for compliance
gucalder Apr 25, 2017
679cbc6
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 25, 2017
ec98570
Leaving the Swagger spec for DiagnosticSettings out of the generation…
gucalder Apr 26, 2017
2d791da
Updating the generate.cmd command to the latest commit for the arm-mo…
gucalder Apr 26, 2017
1e1c3f3
Making the default class namespace consistent with the dll and nuget …
gucalder Apr 26, 2017
6832139
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 26, 2017
84b3cf9
Removing unused test files (DiagnosticSettings) and changing the proj…
gucalder Apr 27, 2017
8551b5a
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Apr 27, 2017
2b6a2da
Search SDK: Rename Management SDK project and update build script (#3…
bitsforthought May 19, 2017
ecd189a
Adding ActivityLogAlerts, ActionGroups, PATCH operations, and the cor…
gucalder Jul 24, 2017
c2e2613
Merge branch 'vs17Dev' of https://github.com/Azure/azure-sdk-for-net …
gucalder Jul 24, 2017
c6a1491
Merge branch 'vs17Dev' of https://github.com/AuxMon/azure-sdk-for-net…
gucalder Jul 24, 2017
7eae955
Making the assembly version consistent
gucalder Jul 25, 2017
4e5b30e
Minor changes from PR feedback.
gucalder Jul 26, 2017
99af050
Merge branch 'psSdkJson6' of https://github.com/Azure/azure-sdk-for-n…
gucalder Jul 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Monitor.Management
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ActionGroupsOperations.
/// </summary>
public static partial class ActionGroupsOperationsExtensions
{
/// <summary>
/// Create a new action group or update an existing one.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
/// <param name='actionGroup'>
/// The action group to create or use for the update.
/// </param>
public static ActionGroupResource CreateOrUpdate(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, ActionGroupResource actionGroup)
{
return operations.CreateOrUpdateAsync(resourceGroupName, actionGroupName, actionGroup).GetAwaiter().GetResult();
}

/// <summary>
/// Create a new action group or update an existing one.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
/// <param name='actionGroup'>
/// The action group to create or use for the update.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ActionGroupResource> CreateOrUpdateAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, ActionGroupResource actionGroup, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, actionGroupName, actionGroup, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Get an action group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
public static ActionGroupResource Get(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName)
{
return operations.GetAsync(resourceGroupName, actionGroupName).GetAwaiter().GetResult();
}

/// <summary>
/// Get an action group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ActionGroupResource> GetAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, actionGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Delete an action group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
public static void Delete(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName)
{
operations.DeleteAsync(resourceGroupName, actionGroupName).GetAwaiter().GetResult();
}

/// <summary>
/// Delete an action group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task DeleteAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, actionGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}

/// <summary>
/// Get a list of all action groups in a subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static IEnumerable<ActionGroupResource> ListBySubscriptionId(this IActionGroupsOperations operations)
{
return operations.ListBySubscriptionIdAsync().GetAwaiter().GetResult();
}

/// <summary>
/// Get a list of all action groups in a subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<ActionGroupResource>> ListBySubscriptionIdAsync(this IActionGroupsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListBySubscriptionIdWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Get a list of all action groups in a resource group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
public static IEnumerable<ActionGroupResource> ListByResourceGroup(this IActionGroupsOperations operations, string resourceGroupName)
{
return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
}

/// <summary>
/// Get a list of all action groups in a resource group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<ActionGroupResource>> ListByResourceGroupAsync(this IActionGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Enable a receiver in an action group. This changes the receiver's status
/// from Disabled to Enabled.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
/// <param name='receiverName'>
/// The name of the receiver to resubscribe.
/// </param>
public static void EnableReceiver(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, string receiverName)
{
operations.EnableReceiverAsync(resourceGroupName, actionGroupName, receiverName).GetAwaiter().GetResult();
}

/// <summary>
/// Enable a receiver in an action group. This changes the receiver's status
/// from Disabled to Enabled.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='actionGroupName'>
/// The name of the action group.
/// </param>
/// <param name='receiverName'>
/// The name of the receiver to resubscribe.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task EnableReceiverAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, string receiverName, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.EnableReceiverWithHttpMessagesAsync(resourceGroupName, actionGroupName, receiverName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}

}
}
Loading