Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the NetworkResourceProviderClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public NetworkResourceProviderClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._applicationGateways = new ApplicationGatewayOperations(this);
     this._expressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationOperations(this);
     this._expressRouteCircuits         = new ExpressRouteCircuitOperations(this);
     this._expressRouteCircuitPeerings  = new ExpressRouteCircuitPeeringOperations(this);
     this._expressRouteServiceProviders = new ExpressRouteServiceProviderOperations(this);
     this._loadBalancers         = new LoadBalancerOperations(this);
     this._localNetworkGateways  = new LocalNetworkGatewayOperations(this);
     this._networkInterfaces     = new NetworkInterfaceOperations(this);
     this._networkSecurityGroups = new NetworkSecurityGroupOperations(this);
     this._publicIpAddresses     = new PublicIpAddressOperations(this);
     this._routes        = new RouteOperations(this);
     this._routeTables   = new RouteTableOperations(this);
     this._securityRules = new SecurityRuleOperations(this);
     this._subnets       = new SubnetOperations(this);
     this._usages        = new UsageOperations(this);
     this._virtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionOperations(this);
     this._virtualNetworkGateways           = new VirtualNetworkGatewayOperations(this);
     this._virtualNetworks = new VirtualNetworkOperations(this);
     this._apiVersion      = "2015-05-01-preview";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// The Put NetworkInterface operation creates/updates a
 /// networkInterface
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='networkInterfaceName'>
 /// Required. The name of the network interface.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the create/update NetworkInterface
 /// operation
 /// </param>
 /// <returns>
 /// Response for PutNetworkInterface Api servive call
 /// </returns>
 public static NetworkInterfacePutResponse BeginCreateOrUpdating(this INetworkInterfaceOperations operations, string resourceGroupName, string networkInterfaceName, NetworkInterface parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((INetworkInterfaceOperations)s).BeginCreateOrUpdatingAsync(resourceGroupName, networkInterfaceName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The List networkInterfaces opertion retrieves all the
 /// networkInterfaces in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <returns>
 /// Response for ListNetworkInterface Api service call
 /// </returns>
 public static NetworkInterfaceListResponse ListAll(this INetworkInterfaceOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((INetworkInterfaceOperations)s).ListAllAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='networkInterfaceName'>
 /// Required. The name of the network interface.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Delete(this INetworkInterfaceOperations operations, string resourceGroupName, string networkInterfaceName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((INetworkInterfaceOperations)s).DeleteAsync(resourceGroupName, networkInterfaceName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the NetworkResourceProviderClient
 /// class.
 /// </summary>
 public NetworkResourceProviderClient()
     : base()
 {
     this._loadBalancers         = new LoadBalancerOperations(this);
     this._localNetworkGateways  = new LocalNetworkGatewayOperations(this);
     this._networkInterfaces     = new NetworkInterfaceOperations(this);
     this._networkSecurityGroups = new NetworkSecurityGroupOperations(this);
     this._publicIpAddresses     = new PublicIpAddressOperations(this);
     this._securityRules         = new SecurityRuleOperations(this);
     this._subnets = new SubnetOperations(this);
     this._usages  = new UsageOperations(this);
     this._virtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionOperations(this);
     this._virtualNetworkGateways           = new VirtualNetworkGatewayOperations(this);
     this._virtualNetworks = new VirtualNetworkOperations(this);
     this._apiVersion      = "2015-05-01-preview";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// The Put NetworkInterface operation creates/updates a
 /// networkInterface
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='networkInterfaceName'>
 /// Required. The name of the network interface.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the create/update NetworkInterface
 /// operation
 /// </param>
 /// <returns>
 /// Response for PutNetworkInterface Api servive call
 /// </returns>
 public static Task <NetworkInterfacePutResponse> BeginCreateOrUpdatingAsync(this INetworkInterfaceOperations operations, string resourceGroupName, string networkInterfaceName, NetworkInterface parameters)
 {
     return(operations.BeginCreateOrUpdatingAsync(resourceGroupName, networkInterfaceName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// The list network interface operation retrieves information about
 /// all network interfaces in a virtual machine from a virtual machine
 /// scale set.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='virtualMachineScaleSetName'>
 /// Required. The name of the virtual machine scale set.
 /// </param>
 /// <param name='virtualmachineIndex'>
 /// Required. The virtual machine index.
 /// </param>
 /// <returns>
 /// Response for ListNetworkInterface Api service call
 /// </returns>
 public static Task <NetworkInterfaceListResponse> ListVirtualMachineScaleSetVMNetworkInterfacesAsync(this INetworkInterfaceOperations operations, string resourceGroupName, string virtualMachineScaleSetName, string virtualmachineIndex)
 {
     return(operations.ListVirtualMachineScaleSetVMNetworkInterfacesAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, CancellationToken.None));
 }
 /// <summary>
 /// The list network interface operation retrieves information about
 /// all network interfaces in a virtual machine from a virtual machine
 /// scale set.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='virtualMachineScaleSetName'>
 /// Required. The name of the virtual machine scale set.
 /// </param>
 /// <param name='virtualmachineIndex'>
 /// Required. The virtual machine index.
 /// </param>
 /// <returns>
 /// Response for ListNetworkInterface Api service call
 /// </returns>
 public static NetworkInterfaceListResponse ListVirtualMachineScaleSetVMNetworkInterfaces(this INetworkInterfaceOperations operations, string resourceGroupName, string virtualMachineScaleSetName, string virtualmachineIndex)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((INetworkInterfaceOperations)s).ListVirtualMachineScaleSetVMNetworkInterfacesAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The List networkInterfaces opertion retrieves all the
 /// networkInterfaces in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <returns>
 /// Response for ListNetworkInterface Api service call
 /// </returns>
 public static Task <NetworkInterfaceListResponse> ListAllAsync(this INetworkInterfaceOperations operations)
 {
     return(operations.ListAllAsync(CancellationToken.None));
 }
 /// <summary>
 /// The List networkInterfaces opertion retrieves all the
 /// networkInterfaces in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <returns>
 /// Response for ListNetworkInterface Api service call
 /// </returns>
 public static Task <NetworkInterfaceListResponse> ListAsync(this INetworkInterfaceOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName, CancellationToken.None));
 }
 /// <summary>
 /// The Get ntework interface operation retreives information about the
 /// specified network interface in a virtual machine scale set.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='virtualMachineScaleSetName'>
 /// Required. The name of the virtual machine scale set.
 /// </param>
 /// <param name='virtualmachineIndex'>
 /// Required. The virtual machine index.
 /// </param>
 /// <param name='networkInterfaceName'>
 /// Required. The name of the network interface.
 /// </param>
 /// <returns>
 /// Response for GetNetworkInterface Api service call
 /// </returns>
 public static Task <NetworkInterfaceGetResponse> GetVirtualMachineScaleSetNetworkInterfaceAsync(this INetworkInterfaceOperations operations, string resourceGroupName, string virtualMachineScaleSetName, string virtualmachineIndex, string networkInterfaceName)
 {
     return(operations.GetVirtualMachineScaleSetNetworkInterfaceAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, CancellationToken.None));
 }
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Network.INetworkInterfaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='networkInterfaceName'>
 /// Required. The name of the network interface.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this INetworkInterfaceOperations operations, string resourceGroupName, string networkInterfaceName)
 {
     return(operations.DeleteAsync(resourceGroupName, networkInterfaceName, CancellationToken.None));
 }