/// <summary> /// Sets IP Forwarding on a role. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.IIPForwardingOperations. /// </param> /// <param name='serviceName'> /// Required. /// </param> /// <param name='deploymentName'> /// Required. /// </param> /// <param name='roleName'> /// Required. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Set IP Forwarding on role /// operation. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static OperationStatusResponse SetOnRole(this IIPForwardingOperations operations, string serviceName, string deploymentName, string roleName, IPForwardingSetParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IIPForwardingOperations)s).SetOnRoleAsync(serviceName, deploymentName, roleName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets the IP Forwarding applied to a network interface. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.IIPForwardingOperations. /// </param> /// <param name='serviceName'> /// Required. /// </param> /// <param name='deploymentName'> /// Required. /// </param> /// <param name='roleName'> /// Required. /// </param> /// <param name='networkInterfaceName'> /// Required. /// </param> /// <returns> /// The IP Forwarding state associated with a role or network interface. /// </returns> public static IPForwardingGetResponse GetForNetworkInterface(this IIPForwardingOperations operations, string serviceName, string deploymentName, string roleName, string networkInterfaceName) { return(Task.Factory.StartNew((object s) => { return ((IIPForwardingOperations)s).GetForNetworkInterfaceAsync(serviceName, deploymentName, roleName, networkInterfaceName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the NetworkManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public NetworkManagementClient(HttpClient httpClient) : base(httpClient) { this._applicationGateways = new ApplicationGatewayOperations(this); this._clientRootCertificates = new ClientRootCertificateOperations(this); this._gateways = new GatewayOperations(this); this._iPForwarding = new IPForwardingOperations(this); this._networks = new NetworkOperations(this); this._networkSecurityGroups = new NetworkSecurityGroupOperations(this); this._reservedIPs = new ReservedIPOperations(this); this._routes = new RouteOperations(this); this._staticIPs = new StaticIPOperations(this); this._virtualIPs = new VirtualIPOperations(this); this._apiVersion = "2015-04-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Sets IP Forwarding on a role. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.IIPForwardingOperations. /// </param> /// <param name='serviceName'> /// Required. /// </param> /// <param name='deploymentName'> /// Required. /// </param> /// <param name='roleName'> /// Required. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Set IP Forwarding on role /// operation. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static Task <OperationStatusResponse> SetOnRoleAsync(this IIPForwardingOperations operations, string serviceName, string deploymentName, string roleName, IPForwardingSetParameters parameters) { return(operations.SetOnRoleAsync(serviceName, deploymentName, roleName, parameters, CancellationToken.None)); }
/// <summary> /// Gets the IP Forwarding applied to a role. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.IIPForwardingOperations. /// </param> /// <param name='serviceName'> /// Required. /// </param> /// <param name='deploymentName'> /// Required. /// </param> /// <param name='roleName'> /// Required. /// </param> /// <returns> /// The IP Forwarding state associated with a role or network interface. /// </returns> public static Task <IPForwardingGetResponse> GetForRoleAsync(this IIPForwardingOperations operations, string serviceName, string deploymentName, string roleName) { return(operations.GetForRoleAsync(serviceName, deploymentName, roleName, CancellationToken.None)); }
/// <summary> /// Sets IP Forwarding on a network interface. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.IIPForwardingOperations. /// </param> /// <param name='serviceName'> /// Required. /// </param> /// <param name='deploymentName'> /// Required. /// </param> /// <param name='roleName'> /// Required. /// </param> /// <param name='networkInterfaceName'> /// Required. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Set IP Forwarding on network /// interface operation. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static Task <OperationStatusResponse> BeginSettingIPForwardingOnNetworkInterfaceAsync(this IIPForwardingOperations operations, string serviceName, string deploymentName, string roleName, string networkInterfaceName, IPForwardingSetParameters parameters) { return(operations.BeginSettingIPForwardingOnNetworkInterfaceAsync(serviceName, deploymentName, roleName, networkInterfaceName, parameters, CancellationToken.None)); }