Пример #1
0
 /// <summary>
 /// The Add Virtual IP operation adds a logical Virtual IP to the
 /// deployment.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IVirtualIPOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the hosted service that contains the given
 /// deployment.
 /// </param>
 /// <param name='deploymentName'>
 /// Required. The name of the deployment where the logical Virtual IP
 /// is to be added.
 /// </param>
 /// <param name='virtualIPName'>
 /// Required. The name of the logical Virtual IP to be added.
 /// </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 Add(this IVirtualIPOperations operations, string serviceName, string deploymentName, string virtualIPName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualIPOperations)s).AddAsync(serviceName, deploymentName, virtualIPName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #2
0
 /// <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);
 }
Пример #3
0
 /// <summary>
 /// The Remove Virtual IP operation removes a logical Virtual IP from
 /// the deployment.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IVirtualIPOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the hosted service that contains the given
 /// deployment.
 /// </param>
 /// <param name='deploymentName'>
 /// Required. The name of the deployment whose logical Virtual IP is to
 /// be removed.
 /// </param>
 /// <param name='virtualIPName'>
 /// Required. The name of the logical Virtual IP to be removed.
 /// </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> RemoveAsync(this IVirtualIPOperations operations, string serviceName, string deploymentName, string virtualIPName)
 {
     return(operations.RemoveAsync(serviceName, deploymentName, virtualIPName, CancellationToken.None));
 }