code: public NetworkSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) {
          return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).toBlocking().single().body();
      }
docs: Creates or updates a network security group in the specified resource group.
  
  @param resourceGroupName The name of the resource group.
  @param networkSecurityGroupName The name of the network security group.
  @param parameters Parameters supplied to the create or update network security group operation.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the NetworkSecurityGroupInner object if successful.