示例#1
0
 /// <summary>
 /// Validate reservedip migration api validates the given reservedip
 /// for IaaS Classic to ARM migration.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. Name of the reservedIP to be migrated.
 /// </param>
 /// <returns>
 /// The Validate Network Migration operation response.
 /// </returns>
 public static NetworkMigrationValidationResponse ValidateMigration(this IReservedIPOperations operations, string ipName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReservedIPOperations)s).ValidateMigrationAsync(ipName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#2
0
 /// <summary>
 /// The Delete Reserved IP operation removes a reserved IP from your
 /// the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. The name of the reserved IP.
 /// </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 Delete(this IReservedIPOperations operations, string ipName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReservedIPOperations)s).DeleteAsync(ipName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#3
0
 /// <summary>
 /// Preview Only. The Begin Creating Reserved IP operation creates a
 /// reserved IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Begin Creating Reserved IP
 /// 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 BeginCreating(this IReservedIPOperations operations, NetworkReservedIPCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReservedIPOperations)s).BeginCreatingAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#4
0
 /// <summary>
 /// Preview Only. The List Reserved IP operation retrieves all of the
 /// virtual IPs reserved for the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <returns>
 /// Preview Only. The response structure for the Server List operation.
 /// </returns>
 public static NetworkReservedIPListResponse List(this IReservedIPOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReservedIPOperations)s).ListAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The Associate Reserved IP operation associates a Reserved IP with a
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='reservedIpName'>
 /// Required. The name of the reserved IP.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to associate Reserved IP.
 /// </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 Associate(this IReservedIPOperations operations, string reservedIpName, NetworkReservedIPMobilityParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReservedIPOperations)s).AssociateAsync(reservedIpName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the VirtualNetworkManagementClient
 /// class.
 /// </summary>
 private VirtualNetworkManagementClient()
     : base()
 {
     this._clientRootCertificates = new ClientRootCertificateOperations(this);
     this._gateways          = new GatewayOperations(this);
     this._networks          = new NetworkOperations(this);
     this._reservedIPs       = new ReservedIPOperations(this);
     this._staticIPs         = new StaticIPOperations(this);
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the NetworkManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private NetworkManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._clientRootCertificates = new ClientRootCertificateOperations(this);
     this._gateways    = new GatewayOperations(this);
     this._networks    = new NetworkOperations(this);
     this._reservedIPs = new ReservedIPOperations(this);
     this._staticIPs   = new StaticIPOperations(this);
     this._apiVersion  = "2014-05-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
示例#8
0
 /// <summary>
 /// Initializes a new instance of the NetworkManagementClient class.
 /// </summary>
 public NetworkManagementClient()
     : base()
 {
     this._applicationGateways    = new ApplicationGatewayOperations(this);
     this._clientRootCertificates = new ClientRootCertificateOperations(this);
     this._gateways = new GatewayOperations(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._apiVersion = "2014-10-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Preview Only. The Get Reserved IP operation retrieves the details
 /// for virtual IP reserved for the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// The name of the reserved IP to retrieve.
 /// </param>
 /// <returns>
 /// Preview Only. A reserved IP associated with your subscription.
 /// </returns>
 public static NetworkReservedIPGetResponse Get(this IReservedIPOperations operations, string ipName)
 {
     try
     {
         return(operations.GetAsync(ipName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Delete Reserved IP operation removes a reserved IP from your
 /// the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// The name of the reserved IP.
 /// </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 VirtualNetworkOperationStatusResponse Delete(this IReservedIPOperations operations, string ipName)
 {
     try
     {
         return(operations.DeleteAsync(ipName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Preview Only. The Delete Reserved IP operation removes a reserved
 /// IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// The name of the reserved IP.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginDeleting(this IReservedIPOperations operations, string ipName)
 {
     try
     {
         return(operations.BeginDeletingAsync(ipName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Preview Only. The List Reserved IP operation retrieves the virtual
 /// IPs reserved for the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <returns>
 /// Preview Only. The response structure for the Server List operation
 /// </returns>
 public static NetworkReservedIPListResponse List(this IReservedIPOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Preview Only. The Create Reserved IP operation creates a reserved
 /// IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Virtual Machine Image 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 VirtualNetworkOperationStatusResponse BeginCreating(this IReservedIPOperations operations, NetworkReservedIPCreateParameters parameters)
 {
     try
     {
         return(operations.BeginCreatingAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
示例#14
0
 /// <summary>
 /// Validate reservedip migration api validates the given reservedip
 /// for IaaS Classic to ARM migration.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. Name of the reservedIP to be migrated.
 /// </param>
 /// <returns>
 /// The Validate Network Migration operation response.
 /// </returns>
 public static Task <NetworkMigrationValidationResponse> ValidateMigrationAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.ValidateMigrationAsync(ipName, CancellationToken.None));
 }
示例#15
0
 /// <summary>
 /// Preview Only. The List Reserved IP operation retrieves all of the
 /// virtual IPs reserved for the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <returns>
 /// Preview Only. The response structure for the Server List operation.
 /// </returns>
 public static Task <NetworkReservedIPListResponse> ListAsync(this IReservedIPOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }
示例#16
0
 /// <summary>
 /// Preview Only. The Get Reserved IP operation retrieves the details
 /// for the virtual IP reserved for the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. The name of the reserved IP to retrieve.
 /// </param>
 /// <returns>
 /// Preview Only. A reserved IP associated with your subscription.
 /// </returns>
 public static Task <NetworkReservedIPGetResponse> GetAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.GetAsync(ipName, CancellationToken.None));
 }
示例#17
0
 /// <summary>
 /// The Delete Reserved IP operation removes a reserved IP from your
 /// the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. The name of the reserved IP.
 /// </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> DeleteAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.DeleteAsync(ipName, CancellationToken.None));
 }
 /// <summary>
 /// The Create Reserved IP operation creates a reserved IP from your
 /// the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.VirtualNetworks.IReservedIPOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Virtual Machine Image 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 <VirtualNetworkOperationStatusResponse> CreateAsync(this IReservedIPOperations operations, NetworkReservedIPCreateParameters parameters)
 {
     return(operations.CreateAsync(parameters, CancellationToken.None));
 }
示例#19
0
 /// <summary>
 /// Preview Only. The Begin Deleting Reserved IP operation removes a
 /// reserved IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. The name of the reserved IP.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> BeginDeletingAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.BeginDeletingAsync(ipName, CancellationToken.None));
 }
 /// <summary>
 /// The Associate Reserved IP operation associates a Reserved IP with a
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='reservedIpName'>
 /// Required. The name of the reserved IP.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to associate Reserved IP.
 /// </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> AssociateAsync(this IReservedIPOperations operations, string reservedIpName, NetworkReservedIPMobilityParameters parameters)
 {
     return(operations.AssociateAsync(reservedIpName, parameters, CancellationToken.None));
 }
示例#21
0
 /// <summary>
 /// Preview Only. The Begin Creating Reserved IP operation creates a
 /// reserved IP from your the subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Begin Creating Reserved IP
 /// 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> BeginCreatingAsync(this IReservedIPOperations operations, NetworkReservedIPCreateParameters parameters)
 {
     return(operations.BeginCreatingAsync(parameters, CancellationToken.None));
 }
示例#22
0
 /// <summary>
 /// Prepare resservedIP migration api validates and prepares the given
 /// reservedIP for IaaS Classic to ARM migration.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IReservedIPOperations.
 /// </param>
 /// <param name='ipName'>
 /// Required. Name of the reservedIP to be migrated.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> BeginPrepareMigrationAsync(this IReservedIPOperations operations, string ipName)
 {
     return(operations.BeginPrepareMigrationAsync(ipName, CancellationToken.None));
 }