/// <summary> /// Create and start a packet capture on the specified VM. /// </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='packetCaptureName'> /// The name of the packet capture session. /// </param> /// <param name='parameters'> /// Parameters that define the create packet capture operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PacketCaptureResult> BeginCreateAsync(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName, PacketCapture parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all packet capture sessions within the specified 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='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <PacketCaptureResult> > ListAsync(this IPacketCapturesOperations 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> /// Query the status of a running packet capture session. /// </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 resource. /// </param> /// <param name='packetCaptureName'> /// The name given to the packet capture session. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PacketCaptureQueryStatusResult> GetStatusAsync(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetStatusWithHttpMessagesAsync(resourceGroupName, networkWatcherName, packetCaptureName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
///GENMHASH:2357B38E494D9F10171A28E135CB1715:3961EA7B900ECE15CB8B6D76F00F665B internal PacketCaptureImpl(string name, NetworkWatcherImpl parent, PacketCaptureResultInner innerObject, IPacketCapturesOperations client) : base(name, innerObject) { this.client = client; this.parent = parent; this.createParameters = new PacketCaptureInner(); }
/// <summary> /// Gets a packet capture session by name. /// </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='packetCaptureName'> /// The name of the packet capture session. /// </param> public static PacketCaptureResult Get(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName) { return(operations.GetAsync(resourceGroupName, networkWatcherName, packetCaptureName).GetAwaiter().GetResult()); }
/// <summary> /// Query the status of a running packet capture session. /// </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 resource. /// </param> /// <param name='packetCaptureName'> /// The name given to the packet capture session. /// </param> public static PacketCaptureQueryStatusResult BeginGetStatus(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName) { return(operations.BeginGetStatusAsync(resourceGroupName, networkWatcherName, packetCaptureName).GetAwaiter().GetResult()); }
/// <summary> /// Stops a specified packet capture session. /// </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='packetCaptureName'> /// The name of the packet capture session. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStopAsync(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, networkWatcherName, packetCaptureName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Stops a specified packet capture session. /// </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='packetCaptureName'> /// The name of the packet capture session. /// </param> public static void BeginStop(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName) { operations.BeginStopAsync(resourceGroupName, networkWatcherName, packetCaptureName).GetAwaiter().GetResult(); }
/// <summary> /// Create and start a packet capture on the specified VM. /// </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='packetCaptureName'> /// The name of the packet capture session. /// </param> /// <param name='parameters'> /// Parameters that define the create packet capture operation. /// </param> public static PacketCaptureResult Create(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName, string packetCaptureName, PacketCapture parameters) { return(operations.CreateAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all packet capture sessions within the specified 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='networkWatcherName'> /// The name of the Network Watcher resource. /// </param> public static IEnumerable <PacketCaptureResult> List(this IPacketCapturesOperations operations, string resourceGroupName, string networkWatcherName) { return(operations.ListAsync(resourceGroupName, networkWatcherName).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new PacketCapturesImpl. /// </summary> /// <param name="parent">The Network Watcher associated with Packet Captures.</param> ///GENMHASH:750F0D1D5E828511C6FDB39095E47895:8DA68F36B326063647048D7F9A34FC05 internal PacketCapturesImpl(IPacketCapturesOperations innerCollection, NetworkWatcherImpl parent) { this.parent = parent; this.innerCollection = innerCollection; }