/// <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 = "2017-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the NetworkResourceProviderClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public NetworkResourceProviderClient(HttpClient httpClient) : base(httpClient) { 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> /// Add new Network Security Rule to existing Network Security Group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='networkSecurityGroupName'> /// Optional. /// </param> /// <param name='ruleName'> /// Optional. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Set Network Security Rule /// 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> SetRuleAsync(this INetworkSecurityGroupOperations operations, string networkSecurityGroupName, string ruleName, NetworkSecuritySetRuleParameters parameters) { return(operations.SetRuleAsync(networkSecurityGroupName, ruleName, parameters, CancellationToken.None)); }
/// <summary> /// Removes a Network Security Group from a subnet. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='virtualNetworkName'> /// Required. /// </param> /// <param name='subnetName'> /// Required. /// </param> /// <param name='networkSecurityGroupName'> /// Required. /// </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> RemoveFromSubnetAsync(this INetworkSecurityGroupOperations operations, string virtualNetworkName, string subnetName, string networkSecurityGroupName) { return(operations.RemoveFromSubnetAsync(virtualNetworkName, subnetName, networkSecurityGroupName, CancellationToken.None)); }
/// <summary> /// Lists all of the Network Security Groups for the subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <returns> /// The List Definitions operation response. /// </returns> public static Task <NetworkSecurityGroupListResponse> ListAsync(this INetworkSecurityGroupOperations operations) { return(operations.ListAsync(CancellationToken.None)); }
/// <summary> /// Gets the Network Security Group applied to a specific subnet. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='virtualNetworkName'> /// Required. /// </param> /// <param name='subnetName'> /// Required. /// </param> /// <returns> /// The Network Security Group associated with a subnet. /// </returns> public static Task <NetworkSecurityGroupGetForSubnetResponse> GetForSubnetAsync(this INetworkSecurityGroupOperations operations, string virtualNetworkName, string subnetName) { return(operations.GetForSubnetAsync(virtualNetworkName, subnetName, CancellationToken.None)); }
/// <summary> /// Gets the details for the specified Network Security Group in the /// subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the Network Security Group to retrieve. /// </param> /// <param name='detailLevel'> /// Optional. Use 'Full' to list rules. /// </param> /// <returns> /// A Network Security Group associated with your subscription. /// </returns> public static Task <NetworkSecurityGroupGetResponse> GetAsync(this INetworkSecurityGroupOperations operations, string networkSecurityGroupName, string detailLevel) { return(operations.GetAsync(networkSecurityGroupName, detailLevel, CancellationToken.None)); }
/// <summary> /// The Delete Network Security Rule operation removes a rule from the /// specified Network Security Group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the Network Security Group. /// </param> /// <param name='ruleName'> /// Required. The name of the rule to delete. /// </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> DeleteRuleAsync(this INetworkSecurityGroupOperations operations, string networkSecurityGroupName, string ruleName) { return(operations.DeleteRuleAsync(networkSecurityGroupName, ruleName, CancellationToken.None)); }
/// <summary> /// Creates a new Network Security Group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Create Network Security Group /// 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> CreateAsync(this INetworkSecurityGroupOperations operations, NetworkSecurityGroupCreateParameters parameters) { return(operations.CreateAsync(parameters, CancellationToken.None)); }
/// <summary> /// Deletes the pecified Network Security Group from your /// subscription.If the Network Security group is still associated /// with some VM/Role/Subnet, the deletion will fail. In order to /// successfully delete the Network Security, it needs to be not used. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the Network Security Group to delete. /// </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> BeginDeletingAsync(this INetworkSecurityGroupOperations operations, string networkSecurityGroupName) { return(operations.BeginDeletingAsync(networkSecurityGroupName, CancellationToken.None)); }
/// <summary> /// Adds a Network Security Group to a subnet. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='virtualNetworkName'> /// Required. /// </param> /// <param name='subnetName'> /// Required. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Add Network Security Group to /// subnet 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> BeginAddingToSubnetAsync(this INetworkSecurityGroupOperations operations, string virtualNetworkName, string subnetName, NetworkSecurityGroupAddToSubnetParameters parameters) { return(operations.BeginAddingToSubnetAsync(virtualNetworkName, subnetName, parameters, CancellationToken.None)); }
/// <summary> /// The Put NetworkSecurityGroup operation creates/updates a network /// security groupin the specified resource group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the network security group. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the create/update Network Security /// Group operation /// </param> /// <returns> /// Response for PUT NetworkSecurityGroups Api servive call /// </returns> public static Task <NetworkSecurityGroupPutResponse> BeginCreateOrUpdatingAsync(this INetworkSecurityGroupOperations operations, string resourceGroupName, string networkSecurityGroupName, NetworkSecurityGroup parameters) { return(operations.BeginCreateOrUpdatingAsync(resourceGroupName, networkSecurityGroupName, parameters, CancellationToken.None)); }
/// <summary> /// The list NetworkSecurityGroups returns all network security groups /// in a resource group /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <returns> /// Response for ListNetworkSecurityGroups Api servive call /// </returns> public static Task <NetworkSecurityGroupListResponse> ListAsync(this INetworkSecurityGroupOperations operations, string resourceGroupName) { return(operations.ListAsync(resourceGroupName, CancellationToken.None)); }
/// <summary> /// The Delete NetworkSecurityGroup operation deletes the specifed /// network security group /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the network security group. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this INetworkSecurityGroupOperations operations, string resourceGroupName, string networkSecurityGroupName) { return(operations.DeleteAsync(resourceGroupName, networkSecurityGroupName, CancellationToken.None)); }