/// <summary> /// Create or update a connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> /// <param name='parameters'> /// Parameters that define the operation to create a connection monitor. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ConnectionMonitorResult> CreateOrUpdateAsync(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, ConnectionMonitor parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update tags of the specified connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='networkWatcherName'> /// The name of the network watcher. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> /// <param name='tags'> /// Resource tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ConnectionMonitorResultInner> UpdateTagsAsync(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, networkWatcherName, connectionMonitorName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Query a snapshot of the most recent connection states. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name given to the connection monitor. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ConnectionMonitorQueryResult> BeginQueryAsync(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginQueryWithHttpMessagesAsync(resourceGroupName, networkWatcherName, connectionMonitorName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
///GENMHASH:5FF6F22B17DD7078FE6B3E25A08DAF00:C76EE92DA65DAA991DB405193AE42CE5 internal ConnectionMonitorImpl(string name, NetworkWatcherImpl parent, ConnectionMonitorResultInner innerObject, IConnectionMonitorsOperations client) : base(name, innerObject) { this.client = client; this.parent = parent; this.createParameters = new ConnectionMonitorInner() { Location = parent.RegionName }; }
/// <summary> /// Gets a connection monitor by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> public static ConnectionMonitorResult Get(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName) { return(operations.GetAsync(resourceGroupName, networkWatcherName, connectionMonitorName).GetAwaiter().GetResult()); }
/// <summary> /// Starts the specified connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStartAsync(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, networkWatcherName, connectionMonitorName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Starts the specified connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> public static void BeginStart(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName) { operations.BeginStartAsync(resourceGroupName, networkWatcherName, connectionMonitorName).GetAwaiter().GetResult(); }
/// <summary> /// Create or update a connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> /// <param name='parameters'> /// Parameters that define the operation to create a connection monitor. /// </param> public static ConnectionMonitorResult CreateOrUpdate(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, ConnectionMonitor parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all connection monitors for the specified Network Watcher. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> public static IEnumerable <ConnectionMonitorResult> List(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName) { return(operations.ListAsync(resourceGroupName, networkWatcherName).GetAwaiter().GetResult()); }
/// <summary> /// Starts the specified connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> public static async void StartV1(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName) { (await((ConnectionMonitorsOperations)operations).StartWithHttpMessagesV1Async(resourceGroupName, networkWatcherName, connectionMonitorName, null, default(CancellationToken)).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets a connection monitor by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> public static ConnectionMonitorResult GetV1(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName) { AzureOperationResponse <ConnectionMonitorResult> _response = ((ConnectionMonitorsOperations)operations).GetWithHttpMessagesV1Async(resourceGroupName, networkWatcherName, connectionMonitorName, null, default(CancellationToken)).GetAwaiter().GetResult(); return(_response.Body); }
/// <summary> /// Create or update a connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> /// <param name='parameters'> /// Parameters that define the operation to create a connection monitor. /// </param> public static async Task <ConnectionMonitorResult> CreateOrUpdateV1(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, ConnectionMonitor parameters) { AzureOperationResponse <ConnectionMonitorResult> _response = await((ConnectionMonitorsOperations)operations).BeginCreateOrUpdateWithHttpMessagesV1Async(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, null, default(CancellationToken)).ConfigureAwait(false); return(_response.Body); }
/// <summary> /// Lists all connection monitors for the specified Network Watcher. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing Network Watcher. /// </param> /// <param name='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <ConnectionMonitorResultInner> > ListAsync(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, networkWatcherName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update tags of the specified connection monitor. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='networkWatcherName'> /// The name of the network watcher. /// </param> /// <param name='connectionMonitorName'> /// The name of the connection monitor. /// </param> /// <param name='parameters'> /// Parameters supplied to update connection monitor tags. /// </param> public static ConnectionMonitorResult UpdateTags(this IConnectionMonitorsOperations operations, string resourceGroupName, string networkWatcherName, string connectionMonitorName, TagsObject parameters) { return(operations.UpdateTagsAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new ConnectionMonitorsImpl. /// </summary> /// <param name="parent">The Network Watcher associated with Connection Monitors.</param> ///GENMHASH:5865540D916685B2F54AE4C598C4AF30:8DA68F36B326063647048D7F9A34FC05 internal ConnectionMonitorsImpl(IConnectionMonitorsOperations innerCollection, NetworkWatcherImpl parent) { this.parent = parent; this.innerCollection = innerCollection; }